use of com.hazelcast.scheduledexecutor.impl.operations.ShutdownOperation in project hazelcast by hazelcast.
the class ScheduledExecutorServiceProxy method shutdown.
@Override
public void shutdown() {
NodeEngine nodeEngine = getNodeEngine();
Collection<Member> members = nodeEngine.getClusterService().getMembers();
OperationService operationService = nodeEngine.getOperationService();
Collection<Future> calls = new LinkedList<Future>();
for (Member member : members) {
if (member.localMember()) {
getService().shutdownExecutor(name);
} else {
Operation op = new ShutdownOperation(name);
calls.add(operationService.invokeOnTarget(SERVICE_NAME, op, member.getAddress()));
}
}
waitWithDeadline(calls, SHUTDOWN_TIMEOUT, TimeUnit.SECONDS, WHILE_SHUTDOWN_EXCEPTION_HANDLER);
}
use of com.hazelcast.scheduledexecutor.impl.operations.ShutdownOperation in project hazelcast by hazelcast.
the class ScheduledExecutorShutdownMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
Operation op = new ShutdownOperation(parameters.schedulerName);
op.setCallerUuid(endpoint.getUuid());
return op;
}
Aggregations