public void beforeRun() throws Exception {
}
@Override
public void run() throws Exception {
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
InternalPartitionServiceImpl partitionService = (InternalPartitionServiceImpl) nodeEngine.getPartitionService();
SerializationService serializationService = nodeEngine.getSerializationService();
int partitionId = getPartitionId();
int replicaIndex = getReplicaIndex();
BufferObjectDataInput in = null;
try {
if (data != null && data.length > 0) {
logApplyReplicaSync(partitionId, replicaIndex);
byte[] taskData = compressed ? IOUtil.decompress(data) : data;
in = serializationService.createObjectDataInput(taskData);
int size = in.readInt();
for (int i = 0; i < size; i++) {
Operation op = (Operation) serializationService.readObject(in);
try {
ErrorLoggingResponseHandler responseHandler
= new ErrorLoggingResponseHandler(nodeEngine.getLogger(op.getClass()));
op.setNodeEngine(nodeEngine)
.setPartitionId(partitionId)
.setReplicaIndex(replicaIndex)
.setResponseHandler(responseHandler);
op.beforeRun();