use of com.hazelcast.spi.impl.operationservice.impl.OperationServiceImpl in project hazelcast by hazelcast.
the class ReplicateUpdateToCallerOperation method notifyCaller.
private void notifyCaller() {
OperationServiceImpl operationService = (OperationServiceImpl) getNodeEngine().getOperationService();
operationService.getInboundResponseHandler().notifyBackupComplete(callId);
}
use of com.hazelcast.spi.impl.operationservice.impl.OperationServiceImpl in project hazelcast by hazelcast.
the class OperationFactoryWrapperTest method testOperationSeesActualCallersUUID.
/**
* OperationFactoryWrapper gets a UUID and sets it to its created operations.
* This test ensures UUID doesn't change through the operation system.
*/
@Test
public void testOperationSeesActualCallersUUID() throws Exception {
HazelcastInstance hz = createHazelcastInstance();
OperationServiceImpl operationService = getOperationServiceImpl(hz);
String expectedCallersUUID = UUID.randomUUID().toString();
GetCallersUUIDOperationFactory operationFactory = new GetCallersUUIDOperationFactory();
OperationFactoryWrapper wrapper = new OperationFactoryWrapper(operationFactory, expectedCallersUUID);
int partitionID = 0;
Map<Integer, Object> responses = operationService.invokeOnPartitions(SERVICE_NAME, wrapper, asList(partitionID));
String actualCallersUUID = (String) responses.get(partitionID);
assertEquals("Callers UUID should not be changed", expectedCallersUUID, actualCallersUUID);
}
use of com.hazelcast.spi.impl.operationservice.impl.OperationServiceImpl in project hazelcast by hazelcast.
the class AtomicLongBackupTest method readAtomicLongValue.
private long readAtomicLongValue(final HazelcastInstance instance) {
final OperationServiceImpl operationService = (OperationServiceImpl) getOperationService(instance);
final AtomicLongService atomicLongService = getNodeEngineImpl(instance).getService(AtomicLongService.SERVICE_NAME);
final GetLongValue task = new GetLongValue(atomicLongService);
operationService.execute(task);
assertOpenEventually(task.latch);
return task.value;
}
Aggregations