io.netty.channel.EventLoop.shutdownGracefully()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(189)

本文整理了Java中io.netty.channel.EventLoop.shutdownGracefully()方法的一些代码示例,展示了EventLoop.shutdownGracefully()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EventLoop.shutdownGracefully()方法的具体详情如下:
包路径:io.netty.channel.EventLoop
类名称:EventLoop
方法名:shutdownGracefully

EventLoop.shutdownGracefully介绍

暂无

代码示例

代码示例来源:origin: netty/netty

@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
  shuttingDown = true;
  for (EventLoop l: activeChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  for (EventLoop l: idleChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  // Notify the future if there was no children.
  if (isTerminated()) {
    terminationFuture.trySuccess(null);
  }
  return terminationFuture();
}

代码示例来源:origin: line/armeria

@Override
public Future<?> shutdownGracefully() {
  return delegate().shutdownGracefully();
}

代码示例来源:origin: redisson/redisson

@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
  shuttingDown = true;
  for (EventLoop l: activeChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  for (EventLoop l: idleChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  // Notify the future if there was no children.
  if (isTerminated()) {
    terminationFuture.trySuccess(null);
  }
  return terminationFuture();
}

代码示例来源:origin: line/armeria

@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout,
                  TimeUnit unit) {
  return delegate().shutdownGracefully(quietPeriod, timeout, unit);
}

代码示例来源:origin: wildfly/wildfly

@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
  shuttingDown = true;
  for (EventLoop l: activeChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  for (EventLoop l: idleChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  // Notify the future if there was no children.
  if (isTerminated()) {
    terminationFuture.trySuccess(null);
  }
  return terminationFuture();
}

代码示例来源:origin: net.oschina.durcframework/easyopen

@Override
  public void run() {
    logger.info("进程退出,关闭Netty客户端...");
    loop.shutdownGracefully();
  }
}

代码示例来源:origin: org.projectreactor/reactor-net

@Override
public void halt() {
  eventLoop.shutdownGracefully();
  super.halt();
}

代码示例来源:origin: org.projectreactor/reactor-tcp

@Override
public void shutdown() {
  eventLoop.shutdownGracefully();
  super.shutdown();
}

代码示例来源:origin: aadnk/ProtocolLib

@Override
public Future<?> shutdownGracefully() {
  return getDelegate().shutdownGracefully();
}

代码示例来源:origin: aadnk/ProtocolLib

@Override
public Future<?> shutdownGracefully(long arg0, long arg1, TimeUnit arg2) {
  return getDelegate().shutdownGracefully(arg0, arg1, arg2);
}

代码示例来源:origin: org.projectreactor/reactor-tcp

@Override
public void halt() {
  eventLoop.shutdownGracefully();
  super.halt();
}

代码示例来源:origin: org.projectreactor/reactor-net

@Override
public void shutdown() {
  eventLoop.shutdownGracefully();
  super.shutdown();
}

代码示例来源:origin: apache/activemq-artemis

@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
  shuttingDown = true;
  for (EventLoop l: activeChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  for (EventLoop l: idleChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  // Notify the future if there was no children.
  if (isTerminated()) {
    terminationFuture.trySuccess(null);
  }
  return terminationFuture();
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
  shuttingDown = true;
  for (EventLoop l: activeChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  for (EventLoop l: idleChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  // Notify the future if there was no children.
  if (isTerminated()) {
    terminationFuture.trySuccess(null);
  }
  return terminationFuture();
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
  shuttingDown = true;
  for (EventLoop l: activeChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  for (EventLoop l: idleChildren) {
    l.shutdownGracefully(quietPeriod, timeout, unit);
  }
  // Notify the future if there was no children.
  if (isTerminated()) {
    terminationFuture.trySuccess(null);
  }
  return terminationFuture();
}

代码示例来源:origin: com.simplyti.cloud/simple-server-core

private void stopLoops() {
  log.info("Stopping executors...");
  run(()->Runtime.getRuntime().removeShutdownHook(jvmShutdownHook));
  stopFuture.setSuccess(null);
  if(!config.externalEventLoopGroup()) {
    eventLoopGroup.shutdownGracefully();
  }
  
  executor().shutdownGracefully();
}

相关文章