/** * Stop the endpoint. This will cause all processing threads to stop. */ @Override public void stopInternal() { releaseConnectionLatch(); if (!paused) { pause(); } if (running) { running = false; unlockAccept(); for (int i=0; pollers!=null && i<pollers.length; i++) { if (pollers[i]==null) continue; pollers[i].destroy(); pollers[i] = null; } try { stopLatch.await(selectorTimeout+100,TimeUnit.MILLISECONDS); } catch (InterruptedException ignore ) {} } eventCache.clear(); keyCache.clear(); nioChannels.clear(); processorCache.clear(); shutdownExecutor(); }
/** * Stop the endpoint. This will cause all processing threads to stop. */ @Override public void stopInternal() { releaseConnectionLatch(); if (!paused) { pause(); } if (running) { running = false; unlockAccept(); for (int i=0; pollers!=null && i<pollers.length; i++) { if (pollers[i]==null) continue; pollers[i].destroy(); pollers[i] = null; } try { stopLatch.await(selectorTimeout + 100, TimeUnit.MILLISECONDS); } catch (InterruptedException ignore) { } } eventCache.clear(); keyCache.clear(); nioChannels.clear(); processorCache.clear(); shutdownExecutor(); }
/** * Stop the endpoint. This will cause all processing threads to stop. */ @Override public void stopInternal() { releaseConnectionLatch(); if (!paused) { pause(); } if (running) { running = false; unlockAccept(); for (int i=0; pollers!=null && i<pollers.length; i++) { if (pollers[i]==null) continue; pollers[i].destroy(); pollers[i] = null; } try { stopLatch.await(selectorTimeout + 100, TimeUnit.MILLISECONDS); } catch (InterruptedException ignore) { } } eventCache.clear(); keyCache.clear(); nioChannels.clear(); processorCache.clear(); shutdownExecutor(); }
/** * Stop the endpoint. This will cause all processing threads to stop. */ @Override public void stopInternal() { releaseConnectionLatch(); if (!paused) { pause(); } if (running) { running = false; unlockAccept(); for (int i=0; pollers!=null && i<pollers.length; i++) { if (pollers[i]==null) continue; pollers[i].destroy(); pollers[i] = null; } try { stopLatch.await(selectorTimeout + 100, TimeUnit.MILLISECONDS); } catch (InterruptedException ignore) { } } eventCache.clear(); keyCache.clear(); nioChannels.clear(); processorCache.clear(); shutdownExecutor(); }