@Override public Future<?> shutdownGracefully() { return group.shutdownGracefully(); }
@Override public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) { return group.shutdownGracefully(quietPeriod, timeout, unit); }
@Override public Future<?> shutdownGracefully() { return group.shutdownGracefully(); }
@Override public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) { return group.shutdownGracefully(quietPeriod, timeout, unit); }
@Override public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) { return group.shutdownGracefully(quietPeriod, timeout, unit); }
@Override public Future<?> shutdownGracefully() { return group.shutdownGracefully(); }
@Override public void shutdown() { try { if (null != clientChannelPool) { clientChannelPool.close(); } this.eventLoopGroupWorker.shutdownGracefully(); if (this.defaultEventExecutorGroup != null) { this.defaultEventExecutorGroup.shutdownGracefully(); } super.destroy(); } catch (Exception exx) { LOGGER.error("shutdown error:" + exx.getMessage()); } }
/** * Shutdown executor in order. * * @param iterator Executors to shutdown. */ private void shutdownGracefully(final Iterator<EventExecutorGroup> iterator) { if (iterator.hasNext()) { EventExecutorGroup group = iterator.next(); if (!group.isShuttingDown()) { group.shutdownGracefully().addListener(future -> { if (!future.isSuccess()) { log.debug("shutdown of {} resulted in exception", group, future.cause()); } shutdownGracefully(iterator); }); } } }
@Override public Promise<Boolean> release(EventExecutorGroup eventLoopGroup, long quietPeriod, long timeout, TimeUnit unit) { logger.debug("Release executor {}", eventLoopGroup); Class<?> key = getKey(release(eventLoopGroup)); if ((key == null && eventLoopGroup.isShuttingDown()) || refCounter.containsKey(eventLoopGroup)) { DefaultPromise<Boolean> promise = new DefaultPromise<Boolean>(GlobalEventExecutor.INSTANCE); promise.setSuccess(true); return promise; } if (key != null) { eventLoopGroups.remove(key); } Future<?> shutdownFuture = eventLoopGroup.shutdownGracefully(quietPeriod, timeout, unit); return toBooleanPromise(shutdownFuture); }
@Override public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) { return group.shutdownGracefully(quietPeriod, timeout, unit); }
@Override public Future<?> shutdownGracefully() { return group.shutdownGracefully(); }
Future<?> shutdown = eventExecutorGroup.shutdownGracefully(quietPeriod, timeout, timeUnit); aggregator.add(toBooleanPromise(shutdown));
@Override public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) { return group.shutdownGracefully(quietPeriod, timeout, unit); }
private void shutdownExecutors() { LOGGER.info("Shutting down Netty Executors for AMQP transport"); workerGroup.shutdownGracefully(); bossGroup.shutdownGracefully(); ioExecutors.shutdownGracefully(); }
private void closeEventExecutorGroup() { if (eventExecutorGroup != null) { try { eventExecutorGroup.shutdownGracefully().sync(); } catch (InterruptedException e) { logger.error("Error stopping socket " + socketDescription, e); } eventExecutorGroup = null; } }
public void shutdownEventExecutor() { try { idleExecutorGroup.shutdownGracefully().sync(); beatsHandlerExecutorGroup.shutdownGracefully().sync(); } catch (InterruptedException e) { throw new IllegalStateException(e); } } }
@Override public void stop() { System.out.println("Shutting down"); // shut down Netty thread pool and close all channels associated with. _bossGroup.shutdownGracefully(); _workerGroup.shutdownGracefully(); _eventExecutors.shutdownGracefully(); }
@AfterClass public static void shutdownExecutor() throws Exception { executor.shutdownGracefully().sync(); }
public void shutdown() { allChannels.close().awaitUninterruptibly(); watchdog.stopWatching(); applicationExecutor.shutdownGracefully(); }
public void shutdown() { allChannels.close().awaitUninterruptibly(); watchdog.stopWatching(); applicationExecutor.shutdownGracefully(); }