use of com.hazelcast.concurrent.semaphore.operations.SemaphoreDetachMemberOperation in project hazelcast by hazelcast.
the class SemaphoreService method onOwnerDisconnected.
private void onOwnerDisconnected(final String owner) {
OperationService operationService = nodeEngine.getOperationService();
for (Map.Entry<String, SemaphoreContainer> entry : containers.entrySet()) {
String name = entry.getKey();
SemaphoreContainer container = entry.getValue();
Operation op = new SemaphoreDetachMemberOperation(name, owner).setPartitionId(container.getPartitionId()).setValidateTarget(false).setService(this).setNodeEngine(nodeEngine).setServiceName(SERVICE_NAME);
// op will be executed on partition thread locally.
// Invocation is to handle retries (if partition is being migrated).
operationService.invokeOnTarget(SERVICE_NAME, op, nodeEngine.getThisAddress());
}
}
Aggregations