use of es.bsc.compss.nio.commands.CommandShutdownACK in project compss by bsc-wdc.
the class NIOWorker method shutdown.
// Shutdown the worker, at this point there are no active transfers
@Override
public void shutdown(Connection closingConnection) {
WORKER_LOGGER.debug("Entering shutdown method on worker");
// Stop the Data Manager
dataManager.stop();
// Finish the main thread
if (closingConnection != null) {
closingConnection.sendCommand(new CommandShutdownACK());
closingConnection.finishConnection();
}
TM.shutdown(closingConnection);
// End storage
String storageConf = System.getProperty(COMPSsConstants.STORAGE_CONF);
if (storageConf != null && !storageConf.equals("") && !storageConf.equals("null")) {
try {
StorageItf.finish();
} catch (StorageException e) {
WORKER_LOGGER.error("Error releasing storage library: " + e.getMessage(), e);
}
}
// Remove workingDir
if (removeWD) {
WORKER_LOGGER.debug("Erasing Worker Sandbox WorkingDir: " + this.workingDir);
try {
removeFolder(this.workingDir);
} catch (IOException ioe) {
WORKER_LOGGER.error("Exception", ioe);
}
}
WORKER_LOGGER.debug("Finish shutdown method on worker");
}
Aggregations