Java Code Examples for com.hazelcast.nio.ObjectDataInput#readShort()
The following examples show how to use
com.hazelcast.nio.ObjectDataInput#readShort() .
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: LogicalNodeTable.java From snowcast with Apache License 2.0 | 6 votes |
@Nonnull static LogicalNodeTable readLogicalNodeTable(@Nonnegative int partitionId, @Nonnull ObjectDataInput in) throws IOException { SequencerDefinition definition = in.readObject(); short size = in.readShort(); Object[] assignmentTable = new Object[definition.getBoundedMaxLogicalNodeCount()]; for (int i = 0; i < size; i++) { short index = in.readShort(); Address address = new Address(); address.readData(in); assignmentTable[index] = address; } return new LogicalNodeTable(partitionId, definition, assignmentTable); }
Example 2
Source File: BackupAttachLogicalNodeOperation.java From snowcast with Apache License 2.0 | 6 votes |
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); logicalNodeId = in.readInt(); address = new Address(); address.readData(in); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); short backupCount = in.readShort(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount); }
Example 3
Source File: BackupDetachLogicalNodeOperation.java From snowcast with Apache License 2.0 | 6 votes |
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); logicalNodeId = in.readInt(); address = new Address(); address.readData(in); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); short backupCount = in.readShort(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount); }
Example 4
Source File: BackupCreateSequencerDefinitionOperation.java From snowcast with Apache License 2.0 | 5 votes |
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); short backupCount = in.readShort(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount); }
Example 5
Source File: CreateSequencerDefinitionOperation.java From snowcast with Apache License 2.0 | 5 votes |
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); short backupCount = in.readShort(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount); }
Example 6
Source File: AttachLogicalNodeOperation.java From snowcast with Apache License 2.0 | 5 votes |
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); short backupCount = in.readShort(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount); }
Example 7
Source File: DetachLogicalNodeOperation.java From snowcast with Apache License 2.0 | 5 votes |
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); logicalNodeId = in.readInt(); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); short backupCount = in.readShort(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount); }
Example 8
Source File: SequencerDefinitionSerializerHook.java From snowcast with Apache License 2.0 | 5 votes |
@Override public SequencerDefinition read(@Nonnull ObjectDataInput in) throws IOException { String sequencerName = in.readUTF(); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); short backupCount = in.readShort(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); return new SequencerDefinition(sequencerName, epoch, maxLogicalNodeCount, backupCount); }