use of com.hazelcast.spi.impl.operationservice.impl.InvocationRegistry in project hazelcast by hazelcast.
the class ClientDisconnectTest method assertEmptyPendingInvocationAndWaitSet.
private void assertEmptyPendingInvocationAndWaitSet(HazelcastInstance server) {
NodeEngineImpl nodeEngine = getNodeEngineImpl(server);
OperationServiceImpl operationService = (OperationServiceImpl) nodeEngine.getOperationService();
final InvocationRegistry invocationRegistry = operationService.getInvocationRegistry();
final OperationParkerImpl operationParker = (OperationParkerImpl) nodeEngine.getOperationParker();
assertTrueEventually(new AssertTask() {
@Override
public void run() {
assertTrue(invocationRegistry.entrySet().isEmpty());
}
});
assertTrueEventually(new AssertTask() {
@Override
public void run() {
assertEquals(0, operationParker.getTotalParkedOperationCount());
}
});
}
use of com.hazelcast.spi.impl.operationservice.impl.InvocationRegistry in project hazelcast by hazelcast.
the class ClientDisconnectTest method assertNonEmptyPendingInvocationAndWaitSet.
private void assertNonEmptyPendingInvocationAndWaitSet(HazelcastInstance server) {
NodeEngineImpl nodeEngine = getNodeEngineImpl(server);
OperationServiceImpl operationService = (OperationServiceImpl) nodeEngine.getOperationService();
final InvocationRegistry invocationRegistry = operationService.getInvocationRegistry();
final OperationParkerImpl operationParker = (OperationParkerImpl) nodeEngine.getOperationParker();
assertTrueEventually(new AssertTask() {
@Override
public void run() {
assertFalse(invocationRegistry.entrySet().isEmpty());
}
});
assertTrueEventually(new AssertTask() {
@Override
public void run() {
assertTrue(operationParker.getTotalParkedOperationCount() > 0);
}
});
}
use of com.hazelcast.spi.impl.operationservice.impl.InvocationRegistry in project hazelcast by hazelcast.
the class PromoteLiteMemberTest method assertPromotionInvocationStarted.
private void assertPromotionInvocationStarted(HazelcastInstance instance) {
OperationServiceImpl operationService = getNode(instance).getNodeEngine().getOperationService();
InvocationRegistry invocationRegistry = operationService.getInvocationRegistry();
assertTrueEventually(() -> {
for (Map.Entry<Long, Invocation> entry : invocationRegistry.entrySet()) {
if (entry.getValue().op instanceof PromoteLiteMemberOp) {
return;
}
}
fail("Cannot find PromoteLiteMemberOp invocation!");
});
}
Aggregations