public void stopServer() throws Exception { LOG.debug("In stopServer method of class: {}", this.getClass().getName()); ChannelGroupFuture future = ALL_CHANNELS.close(); try { future.await(); } catch (InterruptedException e) { LOG.error("Execption occurred while waiting for channels to close: {}",e); } super.stopServer(); }
@Override public void close() { ChannelGroupFuture future = allChannels.close(); future.awaitUninterruptibly(); channelFactory.releaseExternalResources(); closed.countDown(); }
public void run() { ChannelGroupFuture future = ALL_CHANNELS.close(); try { future.await(NettyTCPClient.this.maxShutdownWaitTime); } catch (InterruptedException e) { e.printStackTrace(); } bootstrap.releaseExternalResources(); } });
@Override public void stopServer() throws Exception { LOG.debug("In stopServer method of class: {}", this.getClass().getName()); ChannelGroupFuture future = ALL_CHANNELS.close(); try { future.await(); } catch (InterruptedException e) { LOG.error("Execption occurred while waiting for channels to close: {}",e); } serverBootstrap.releaseExternalResources(); gameAdminService.shutdown(); }
/** * Closes the Netty Channel and releases all resources */ @Override protected void stopInner() { /* * TODO REST-Server Need to handle inflight operations. What happens to * the existing async operations when a channel.close() is issued in * Netty? */ if(this.nettyServerChannel != null) { this.nettyServerChannel.close(); } if(allChannels != null) { allChannels.close().awaitUninterruptibly(); } this.bootstrap.releaseExternalResources(); }
@Override public void shutdown() { LOG.info("shutdown called " + localAddress); if (login != null) { login.shutdown(); } // null if factory never started if (parentChannel != null) { parentChannel.close().awaitUninterruptibly(); closeAll(); allChannels.close().awaitUninterruptibly(); bootstrap.releaseExternalResources(); } if (zkServer != null) { zkServer.shutdown(); } synchronized(this) { killed = true; notifyAll(); } }
@Override public void shutdown() { allChannels.close().awaitUninterruptibly();
public void stop() { super.stop(); if (this.serverChannel != null) { this.serverChannel.close().awaitUninterruptibly(1000); } // close sockets explicitly to reduce socket channel hung in complicated // network environment. if (this.childGroups != null) { this.childGroups.close().awaitUninterruptibly(5000); } if (this.bootstrap != null) { this.bootstrap.releaseExternalResources(); } if (embeddedServer.isStart()) { embeddedServer.stop(); } }
protected void stop() throws Exception { accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS); if (selector != null) { ServerBootstrap bootstrap = new ServerBootstrap(selector); bootstrap.releaseExternalResources(); } if (pipelineFact != null) { pipelineFact.destroy(); } if (timer != null) { // Release this shared timer resource timer.stop(); } if (dirWatcher != null) { dirWatcher.stop(); } }
public void closeAllConnections() { closingLock.writeLock().lock(); try { closed = true; } finally { closingLock.writeLock().unlock(); } openConnections.close(); } }
@Override public void stop() { runtimePort = -1; allChannels.close().awaitUninterruptibly(); if (bootstrap != null) { bootstrap.releaseExternalResources(); } deployment.stop(); } }
public void close() { channelPool.destroy(); openChannels.close(); for (Channel channel : openChannels) { Object attribute = Channels.getAttribute(channel); if (attribute instanceof NettyResponseFuture<?>) { NettyResponseFuture<?> future = (NettyResponseFuture<?>) attribute; future.cancelTimeouts(); } } // FIXME also shutdown in provider config.executorService().shutdown(); if (allowReleaseSocketChannelFactory) { socketChannelFactory.releaseExternalResources(); plainBootstrap.releaseExternalResources(); secureBootstrap.releaseExternalResources(); webSocketBootstrap.releaseExternalResources(); secureWebSocketBootstrap.releaseExternalResources(); } }
@Override public void close() { openChannels.close(); }
@Override public void close() { ChannelGroupFuture future = allChannels.close(); future.awaitUninterruptibly(); channelFactory.releaseExternalResources(); closed.countDown(); }
@Override public void stop() { String name = getClass().getSimpleName(); msgLog.info( name + " communication server shutting down and unbinding from " + socketAddress ); shuttingDown = true; channelGroup.close().awaitUninterruptibly(); bootstrap.releaseExternalResources(); }
public void stop() { logger.info("Closing all server session channels..."); this.sessionChannels.close().awaitUninterruptibly(); logger.info("Closing server channel..."); this.serverChannel.close().awaitUninterruptibly(); logger.info("Releasing server external resources..."); // NOTE: all this does is "terminate()" the executors this.serverBootstrap.releaseExternalResources(); logger.info("Simulator server stopped"); }
public void stop() { logger.info("Closing all server session channels..."); this.sessionChannels.close().awaitUninterruptibly(); logger.info("Closing server channel..."); this.serverChannel.close().awaitUninterruptibly(); logger.info("Releasing server external resources..."); // NOTE: all this does is "terminate()" the executors this.serverBootstrap.releaseExternalResources(); logger.info("Simulator server stopped"); }
public synchronized void stop() { accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS); ServerBootstrap bootstrap = new ServerBootstrap(channelFactory); bootstrap.releaseExternalResources(); }
@Override protected IoFuture dispose0() throws Exception { channelGroup.close().await(); channelFactory.releaseExternalResources(); for (IoSessionIdleTracker tracker : sessionIdleTrackers) { tracker.dispose(); } return null; }
@Override public void stop() { runtimePort = -1; allChannels.close().awaitUninterruptibly(); if (bootstrap != null) { bootstrap.releaseExternalResources(); } deployment.stop(); } }