use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class PartitionLostListenerTest method test_internalPartitionLostEvent_serialization.
@Test
public void test_internalPartitionLostEvent_serialization() throws IOException {
Address address = new Address();
PartitionLostEventImpl internalEvent = new PartitionLostEventImpl(1, 2, address);
ObjectDataOutput output = mock(ObjectDataOutput.class);
internalEvent.writeData(output);
verify(output).writeInt(1);
verify(output).writeInt(2);
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class TransferableJobProcessInformation method writePortable.
@Override
public void writePortable(PortableWriter writer) throws IOException {
writer.writeInt("processedRecords", processedRecords);
ObjectDataOutput out = writer.getRawDataOutput();
out.writeObject(partitionStates);
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class PortableCollection method writePortable.
@Override
public void writePortable(PortableWriter writer) throws IOException {
writer.writeBoolean("l", collection instanceof List);
if (collection == null) {
writer.writeInt("s", -1);
return;
}
writer.writeInt("s", collection.size());
final ObjectDataOutput out = writer.getRawDataOutput();
for (Data data : collection) {
out.writeData(data);
}
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class PortableEntryEvent method writePortable.
@Override
public void writePortable(PortableWriter writer) throws IOException {
// Map Event and Entry Event is merged to one event, because when cpp client get response
// from node, it first creates the class then fills the class what comes from wire. Currently
// it can not handle more than one type response.
writer.writeInt("e", eventType.getType());
writer.writeUTF("u", uuid);
writer.writeInt("n", numberOfAffectedEntries);
ObjectDataOutput out = writer.getRawDataOutput();
out.writeData(key);
out.writeData(value);
out.writeData(oldValue);
out.writeData(mergingValue);
}
use of com.hazelcast.nio.ObjectDataOutput in project hazelcast by hazelcast.
the class PortableReadResultSet method writePortable.
@Override
public void writePortable(PortableWriter writer) throws IOException {
writer.writeInt("readCount", readCount);
// writing the items
writer.writeInt("count", items.size());
ObjectDataOutput rawDataOutput = writer.getRawDataOutput();
for (Object item : items) {
rawDataOutput.writeData((Data) item);
}
}
Aggregations