SerializationService serializationService = nodeEngine.getSerializationService();
BufferObjectDataOutput out = serializationService.createObjectDataOutput(DEFAULT_DATA_OUTPUT_BUFFER_SIZE);
try {
out.writeInt(tasks.size());
for (Operation task : tasks) {
serializationService.writeObject(out, task);
}
data = out.toByteArray();
} finally {
closeResource(out);
}