@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
group.awaitTermination(20, TimeUnit.SECONDS); } catch (InterruptedException ie) { LOG.warn("Interrupted while shutting down event loop");
group.awaitTermination(20, TimeUnit.SECONDS); } catch (InterruptedException ie) { LOG.warn("Interrupted while shutting down event loop");
try eventLoops.awaitTermination( Long.MAX_VALUE, TimeUnit.NANOSECONDS ); } catch ( InterruptedException ex )
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return eventLoopGroup.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return eventLoopGroup.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return eventLoopGroup.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return eventLoopGroup.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
/** * Shuts the event loop groups down and awaits their termination. */ public void shutdown() { acceptorGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); try { acceptorGroup.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS); workerGroup.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS); } catch (InterruptedException ignored) { } }
public void shutdown(boolean graceful) { closeAllChannels(graceful); List<EventLoopGroup> allEventLoopGroups = new ArrayList<>(); allEventLoopGroups.add(serverGroup); allEventLoopGroups.add(childGroup); for (EventLoopGroup group : allEventLoopGroups) { if (graceful) { group.shutdownGracefully(); } else { group.shutdownGracefully(0, 0, TimeUnit.SECONDS); } } if (graceful) { for (EventLoopGroup group : allEventLoopGroups) { try { group.awaitTermination(60, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } }
/** * Waits for the underlying network service to terminate. * * @param timeout Maximum time to wait in seconds. * @return {@code true} if the underlying network service has terminated, {@code false} if the underlying network * service is still active after waiting the specified time. * @throws InterruptedException if the thread performing the operation is interrupted. */ public boolean awaitTermination(long timeout) throws InterruptedException { final String methodName = "awaitTermination"; logger.entry(methodName); final boolean terminated; if (bootstrap != null) { terminated = bootstrap.group().awaitTermination(timeout, TimeUnit.SECONDS); } else { terminated = true; } logger.exit(methodName, terminated); return terminated; } }