use of es.bsc.compss.nio.commands.CommandExecutorShutdown in project compss by bsc-wdc.
the class NIOWorkerNode method shutdownExecutionManager.
@Override
public void shutdownExecutionManager(ExecutorShutdownListener esl) {
if (started) {
LOGGER.debug("Shutting down execution manager " + this.getName());
if (node == null) {
esl.notifyFailure(new UnstartedNodeException());
LOGGER.error("Shutdown execution manager has failed");
}
Connection c = NIOAgent.getTransferManager().startConnection(node);
commManager.shuttingDownEM(this, c, esl);
CommandExecutorShutdown cmd = new CommandExecutorShutdown(null);
c.sendCommand(cmd);
c.receive();
c.finishConnection();
} else {
LOGGER.debug("Worker " + this.getName() + " has not started. Considering execution manager stopped");
esl.notifyEnd();
}
}
Aggregations