public void shutdown() { LOG.info("Shutting down"); halt(); if (workerPool != null) { workerPool.join(workerShutdownTimeoutMS); } if (nextProcessor != null) { nextProcessor.shutdown(); } }
@Override public void join() throws InterruptedException { if (acceptThread != null) { acceptThread.join(); } for (SelectorThread thread : selectorThreads) { thread.join(); } if (workerPool != null) { workerPool.join(workerShutdownTimeoutMS); } }