org.apache.ignite.binary.BinaryReader Java Examples
The following examples show how to use
org.apache.ignite.binary.BinaryReader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PlatformDotNetSessionSetAndUnlockProcessor.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader raw = reader.rawReader(); lockNodeId = raw.readUuid(); lockId = raw.readLong(); update = raw.readBoolean(); if (update) { isDiff = raw.readBoolean(); staticData = raw.readByteArray(); timeout = raw.readInt(); int cnt = raw.readInt(); if (cnt >= 0) { items = new TreeMap<>(); for (int i = 0; i < cnt; i++) items.put(raw.readString(), raw.readByteArray()); } } }
Example #2
Source File: PlatformDotNetEntityFrameworkCacheKey.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader raw = reader.rawReader(); query = raw.readString(); int cnt = raw.readInt(); if (cnt >= 0) { versions = new long[cnt]; for (int i = 0; i < cnt; i++) versions[i] = raw.readLong(); } else versions = null; }
Example #3
Source File: IgniteTopic.java From joyqueue with Apache License 2.0 | 6 votes |
@Override public void readBinary(BinaryReader reader) throws BinaryObjectException { //this.id = reader.readString(COLUMN_ID); String namespace = reader.readString(COLUMN_NAMESPACE); String topicCode = reader.readString(COLUMN_CODE); this.name = new TopicName(topicCode, namespace); this.partitions = reader.readShort(COLUMN_PARTITIONS); this.type = Type.valueOf(reader.readByte(COLUMN_TYPE)); String priorityPartitionsStr = reader.readString(COLUMN_PRIORITY_PARTITIONS); this.priorityPartitions = new TreeSet<>(); if (StringUtils.isNoneEmpty(priorityPartitionsStr) && priorityPartitionsStr.length() > 2) { this.priorityPartitions.addAll( (Arrays.stream(priorityPartitionsStr.substring(1, priorityPartitionsStr.length() - 1).split(",")). map(s -> Short.parseShort(s.trim())).collect(Collectors.toSet())) ); } }
Example #4
Source File: IgniteConsumerConfig.java From joyqueue with Apache License 2.0 | 6 votes |
@Override public void readBinary(BinaryReader reader) throws BinaryObjectException { id = reader.readString(COLUMN_ID); this.consumerPolicy = Consumer.ConsumerPolicy.Builder.build() .nearby(reader.readBoolean(COLUMN_NEAR_BY)) .archive(reader.readBoolean(COLUMN_ARCHIVE)) .retry(reader.readBoolean(COLUMN_RETRY)) .ackTimeout(reader.readInt(COLUMN_ACK_TIMEOUT)) .batchSize(reader.readShort(COLUMN_BATCH_SIZE)) .concurrent(reader.readInt(COLUMN_CONCURRENT)) .delay(reader.readInt(COLUMN_DELAY)) .paused(reader.readBoolean(COLUMN_PAUSED)) .errTimes(reader.readInt(COLUMN_ERROR_TIMES)) .maxPartitionNum(reader.readInt(COLUMN_MAX_PARTITION_NUM)) .retryReadProbability(reader.readInt(COLUMN_RETRY_READ_PROBABILITY)) .blackList(reader.readString(COLUMN_BLACK_LIST)) .filters(reader.readMap(COLUMN_FILTERS)).create(); this.retryPolicy = new RetryPolicy.Builder().build() .maxRetrys(reader.readInt(COLUMN_MAX_RETRYS)) .maxRetryDelay(reader.readInt(COLUMN_MAX_RETRY_DELAY)) .retryDelay(reader.readInt(COLUMN_RETRY_DELAY)) .expireTime(reader.readInt(COLUMN_EXPIRE_TIME)) .create(); this.limitPolicy = new Consumer.ConsumerLimitPolicy(reader.readInt(COLUMN_LIMIT_TPS), reader.readInt(COLUMN_LIMIT_TRAFFIC)); }
Example #5
Source File: IgfsDirectoryInfo.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); readBinary(in); if (in.readBoolean()) { int listingSize = in.readInt(); listing = new HashMap<>(listingSize); for (int i = 0; i < listingSize; i++) { String key = in.readString(); IgfsListingEntry val = IgfsUtils.readListingEntry(in); listing.put(key, val); } } }
Example #6
Source File: IgniteComputeConfigVariationsFullApiTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { Object arg = reader.readObject("arg"); setArguments(arg); isVal = reader.readBoolean("isVal"); bVal = reader.readByte("bVal"); cVal = reader.readChar("cVal"); sVal = reader.readShort("sVal"); intVal = reader.readInt("intVal"); lVal = reader.readLong("lVal"); fltVal = reader.readFloat("fltVal"); dblVal = reader.readDouble("dblVal"); strVal = reader.readString("strVal"); arrVal = reader.readObjectArray("arrVal"); eVal = reader.readEnum("eVal"); }
Example #7
Source File: PlatformDotNetEntityFrameworkCacheEntry.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader raw = reader.rawReader(); int cnt = raw.readInt(); if (cnt >= 0) { entitySets = new String[cnt]; for (int i = 0; i < cnt; i++) entitySets[i] = raw.readString(); } else entitySets = null; data = raw.readByteArray(); }
Example #8
Source File: PlatformJavaObjectFactoryProxy.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReaderEx rawReader = (BinaryRawReaderEx)reader.rawReader(); factoryTyp = rawReader.readInt(); clsName = rawReader.readString(); payload = rawReader.readObjectDetached(); int propsSize = rawReader.readInt(); if (propsSize > 0) { props = new HashMap<>(propsSize); for (int i = 0; i < propsSize; i++) { String key = rawReader.readString(); Object val = rawReader.readObjectDetached(); props.put(key, val); } } }
Example #9
Source File: GridBinaryTestClasses.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { companyByStreet = reader.readMap("companyByStreet", new BinaryMapFactory<String, Companies>() { @Override public Map<String, Companies> create(int size) { return new TreeMap<>(); } }); }
Example #10
Source File: IgniteBroker.java From joyqueue with Apache License 2.0 | 5 votes |
@Override public void readBinary(BinaryReader reader) throws BinaryObjectException { this.id = reader.readInt(COLUMN_BROKER_ID); this.ip = reader.readString(COLUMN_IP); this.port = reader.readInt(COLUMN_PORT); this.dataCenter = reader.readString(COLUMN_DATA_CENTER); this.retryType = reader.readString(COLUMN_RETRY_TYPE); this.permission = PermissionEnum.value(reader.readString(COLUMN_PERMISSION)); }
Example #11
Source File: IgniteUuid.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); locId = in.readLong(); gid = new UUID(in.readLong(), in.readLong()); }
Example #12
Source File: IgfsMetaDirectoryListingReplaceProcessor.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); name = in.readString(); id = BinaryUtils.readIgniteUuid(in); }
Example #13
Source File: IgfsMetaDirectoryListingAddProcessor.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); fileName = in.readString(); entry = IgfsUtils.readListingEntry(in); }
Example #14
Source File: WebSessionAttributeProcessor.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(final BinaryReader reader) throws BinaryObjectException { final BinaryRawReader rawReader = reader.rawReader(); updatesMap = rawReader.readMap(); accessTime = rawReader.readLong(); maxIntervalChanged = rawReader.readBoolean(); if (maxIntervalChanged) maxInactiveInterval = rawReader.readInt(); }
Example #15
Source File: IgfsPathSummary.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader rawReader = reader.rawReader(); filesCnt = rawReader.readInt(); dirCnt = rawReader.readInt(); totalLen = rawReader.readLong(); path = IgfsUtils.readPath(rawReader); }
Example #16
Source File: IgniteNodeInfo.java From vertx-ignite with Apache License 2.0 | 5 votes |
@Override public void readBinary(BinaryReader reader) throws BinaryObjectException { String host = reader.readString("host"); int port = reader.readInt("port"); byte[] bytes = reader.readByteArray("meta"); nodeInfo = new NodeInfo(host, port, bytes != null ? new JsonObject(Buffer.buffer(bytes)) : null); }
Example #17
Source File: IgnitePartitionGroupReplica.java From joyqueue with Apache License 2.0 | 5 votes |
@Override public void readBinary(BinaryReader reader) throws BinaryObjectException { //this.id = reader.readString(COLUMN_ID); this.topic = new TopicName(reader.readString(COLUMN_TOPIC), reader.readString(COLUMN_NAMESPACE)); this.brokerId = reader.readInt(COLUMN_BROKER_ID); this.group = reader.readInt(COLUMN_GROUP_NO); }
Example #18
Source File: BinaryMarshallerSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReaderEx raw = (BinaryRawReaderEx)reader.rawReader(); inner1 = (DetachedInnerTestObject)raw.readObject(); inner2 = raw.readObjectDetached(); inner3 = raw.readObjectDetached(); inner4 = (DetachedInnerTestObject)raw.readObject(); }
Example #19
Source File: WebSessionEntity.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(final BinaryReader reader) throws BinaryObjectException { final BinaryRawReader rawReader = reader.rawReader(); id = rawReader.readString(); createTime = rawReader.readLong(); accessTime = rawReader.readLong(); maxInactiveInterval = rawReader.readInt(); attrs = rawReader.readMap(); }
Example #20
Source File: IgfsMetaFileReserveSpaceProcessor.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); space = in.readLong(); affRange = in.readObject(); }
Example #21
Source File: IgfsMetaDirectoryListingRemoveProcessor.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); fileName = in.readString(); fileId = BinaryUtils.readIgniteUuid(in); }
Example #22
Source File: IgfsMetaDirectoryListingRenameProcessor.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); oldName = in.readString(); newName = in.readString(); }
Example #23
Source File: IgfsMetaUpdateTimesProcessor.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); accessTime = in.readLong(); modificationTime = in.readLong(); }
Example #24
Source File: IgfsFileImpl.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader rawReader = reader.rawReader(); path = IgfsUtils.readPath(rawReader); blockSize = rawReader.readInt(); grpBlockSize = rawReader.readLong(); len = rawReader.readLong(); props = IgfsUtils.readProperties(rawReader); accessTime = rawReader.readLong(); modificationTime = rawReader.readLong(); flags = rawReader.readByte(); }
Example #25
Source File: IgfsListingEntry.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); id = BinaryUtils.readIgniteUuid(in); dir = in.readBoolean(); }
Example #26
Source File: IgfsClientAbstractCallable.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public final void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader rawReader = reader.rawReader(); igfsName = rawReader.readString(); user = rawReader.readString(); path = IgfsUtils.readPath(rawReader); readBinary0(rawReader); }
Example #27
Source File: IgfsFileMap.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); int size = in.readInt(); if (size > 0) { ranges = new ArrayList<>(size); for (int i = 0; i < size; i++) ranges.add((IgfsFileAffinityRange)in.readObject()); } }
Example #28
Source File: IgfsBlockKey.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); fileId = BinaryUtils.readIgniteUuid(in); affKey = BinaryUtils.readIgniteUuid(in); evictExclude = in.readBoolean(); blockId = in.readLong(); }
Example #29
Source File: IgfsFileInfo.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader in = reader.rawReader(); readBinary(in); blockSize = in.readInt(); len = in.readLong(); lockId = BinaryUtils.readIgniteUuid(in); affKey = BinaryUtils.readIgniteUuid(in); fileMap = in.readObject(); evictExclude = in.readBoolean(); }
Example #30
Source File: PlatformDotNetSessionLockResult.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public void readBinary(BinaryReader reader) throws BinaryObjectException { BinaryRawReader raw = reader.rawReader(); success = raw.readBoolean(); if (success) { data = new PlatformDotNetSessionData(); data.readBinary(raw); } lockTime = raw.readTimestamp(); lockId = raw.readLong(); }