List of usage examples for io.netty.channel EventLoopGroup isShuttingDown
boolean isShuttingDown();
From source file:com.streamsets.pipeline.lib.network.BaseNettyServer.java
License:Apache License
public void destroy() { LOG.info("Destroying server on address(es) {}", addresses); for (ChannelFuture channelFuture : channelFutures) { if (channelFuture != null && channelFuture.isCancellable()) { channelFuture.cancel(true);// w w w . ja v a2s. c o m } } try { for (EventLoopGroup group : groups) { if (group != null && !group.isShutdown() && !group.isShuttingDown()) { try { group.shutdownGracefully().get(); } catch (InterruptedException ex) { LOG.error("InterruptedException thrown while shutting down: " + ex, ex); Thread.currentThread().interrupt(); } catch (Exception ex) { LOG.error("Unexpected error shutting down: " + ex, ex); } } } } finally { channelFutures.clear(); } }
From source file:org.apache.tajo.rpc.NettyUtils.java
License:Apache License
protected static boolean isEventLoopGroupShuttingDown(EventLoopGroup eventLoopGroup) { return ((eventLoopGroup == null) || eventLoopGroup.isShuttingDown()); }