@Override public void beforeRun() { NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); int partitionId = getPartitionId(); InternalPartitionService partitionService = nodeEngine.getPartitionService();
@Override public void beforeRun() throws Exception { NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); int partitionId = getPartitionId(); InternalPartitionService partitionService = nodeEngine.getPartitionService();
@Override public void afterRun() throws Exception { if (validationFailure != null || !sync || getCallId() == 0 || originalCaller == null) { return; } NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); long callId = getCallId(); OperationServiceImpl operationService = (OperationServiceImpl) nodeEngine.getOperationService(); if (nodeEngine.getThisAddress().equals(originalCaller)) { operationService.getBackupHandler().notifyBackupComplete(callId); } else { operationService.getOutboundResponseHandler().sendBackupAck(originalCaller, callId, backupOp.isUrgent()); } }
@Override public void run() throws Exception { if (validationFailure != null) { onExecutionFailure(validationFailure); return; } ensureBackupOperationInitialized(); backupOp.beforeRun(); backupOp.run(); backupOp.afterRun(); NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); PartitionReplicaVersionManager versionManager = nodeEngine.getPartitionService().getPartitionReplicaVersionManager(); versionManager.updatePartitionReplicaVersions(getPartitionId(), namespace, replicaVersions, getReplicaIndex()); }
@Override public void run() throws Exception { if (validationFailure != null) { onExecutionFailure(validationFailure); return; } ensureBackupOperationInitialized(); backupOp.beforeRun(); backupOp.run(); backupOp.afterRun(); NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); PartitionReplicaVersionManager versionManager = nodeEngine.getPartitionService().getPartitionReplicaVersionManager(); versionManager.updatePartitionReplicaVersions(getPartitionId(), namespace, replicaVersions, getReplicaIndex()); }
@Override public void afterRun() throws Exception { if (validationFailure != null || !sync || getCallId() == 0 || originalCaller == null) { return; } NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); long callId = getCallId(); OperationServiceImpl operationService = (OperationServiceImpl) nodeEngine.getOperationService(); if (nodeEngine.getThisAddress().equals(originalCaller)) { operationService.getBackupHandler().notifyBackupComplete(callId); } else { operationService.getOutboundResponseHandler().sendBackupAck(originalCaller, callId, backupOp.isUrgent()); } }
private void ensureBackupOperationInitialized() { if (!backupOperationInitialized) { backupOperationInitialized = true; backupOp.setNodeEngine(getNodeEngine()); backupOp.setPartitionId(getPartitionId()); backupOp.setReplicaIndex(getReplicaIndex()); backupOp.setCallerUuid(getCallerUuid()); OperationAccessor.setCallerAddress(backupOp, getCallerAddress()); OperationAccessor.setInvocationTime(backupOp, Clock.currentTimeMillis()); backupOp.setOperationResponseHandler(createEmptyResponseHandler()); } }
private void ensureBackupOperationInitialized() { if (!backupOperationInitialized) { backupOperationInitialized = true; backupOp.setNodeEngine(getNodeEngine()); backupOp.setPartitionId(getPartitionId()); backupOp.setReplicaIndex(getReplicaIndex()); backupOp.setCallerUuid(getCallerUuid()); OperationAccessor.setCallerAddress(backupOp, getCallerAddress()); OperationAccessor.setInvocationTime(backupOp, Clock.currentTimeMillis()); backupOp.setOperationResponseHandler(createEmptyResponseHandler()); } }