use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class AccumulatorInfo method writePortable.
@Override
public void writePortable(PortableWriter writer) throws IOException {
writer.writeUTF("mn", mapName);
writer.writeUTF("cn", cacheName);
writer.writeInt("bas", batchSize);
writer.writeInt("bus", bufferSize);
writer.writeLong("ds", delaySeconds);
writer.writeBoolean("iv", includeValue);
writer.writeBoolean("ps", publishable);
writer.writeBoolean("co", coalesce);
writer.writeBoolean("po", populate);
ObjectDataOutput output = writer.getRawDataOutput();
output.writeObject(predicate);
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class ReplicatedMapPortableEntryEvent method writePortable.
public void writePortable(PortableWriter writer) throws IOException {
writer.writeInt("e", eventType.getType());
writer.writeUTF("u", uuid);
final ObjectDataOutput out = writer.getRawDataOutput();
out.writeData(key);
out.writeData(value);
out.writeData(oldValue);
out.writeInt(numberOfAffectedEntries);
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class ReplicatedMapValueCollection method writePortable.
@Override
public void writePortable(PortableWriter writer) throws IOException {
writer.writeInt("size", values.size());
ObjectDataOutput out = writer.getRawDataOutput();
for (Data value : values) {
out.writeData(value);
}
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class PortablePartitionLostEvent method writePortable.
@Override
public void writePortable(PortableWriter writer) throws IOException {
writer.writeInt("p", partitionId);
writer.writeInt("l", lostBackupCount);
final ObjectDataOutput out = writer.getRawDataOutput();
out.writeObject(source);
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class ClientPartitionLostListenerTest method test_portableMapPartitionLostEvent_serialization.
@Test
public void test_portableMapPartitionLostEvent_serialization() throws IOException {
final Address source = new Address();
final PortablePartitionLostEvent event = new PortablePartitionLostEvent(1, 2, source);
final PortableWriter writer = mock(PortableWriter.class);
final ObjectDataOutput output = mock(ObjectDataOutput.class);
when(writer.getRawDataOutput()).thenReturn(output);
event.writePortable(writer);
verify(writer).writeInt("p", 1);
verify(writer).writeInt("l", 2);
verify(output).writeObject(source);
}
Aggregations