private void shutdown(boolean fromShutdownHook, boolean forceImmediate) { if (clientStopped.attemptSet()) { DSO_LOGGER.info( "shuting down Terracotta Client hook=" + fromShutdownHook + " force=" + forceImmediate); shutdownClient(fromShutdownHook, forceImmediate); } else { DSO_LOGGER.info("Client already shutdown."); } synchronized (this) { // notify in case the connection establisher is waiting for something notifyAll(); } }
public void requestStop() { if (stopRequested.attemptSet()) { readerComm.requestStop(); writerComm.requestStop(); } }
private synchronized void connectionMade() { connectionMade.attemptSet(); notifyAll(); }