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

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

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

EpollEventLoopGroup.shutdownGracefully介绍

暂无

代码示例

代码示例来源:origin: codeabovelab/haven-platform

@Override
public void destroy() throws Exception {
  group.shutdownGracefully();
}

代码示例来源:origin: com.netflix.rxnetty/rx-netty

private EpollEventLoopGroup getNativeEventLoop() {
  EpollEventLoopGroup eventLoopGroup = nativeEventLoop.get();
  if (null == eventLoopGroup) {
    EpollEventLoopGroup newEventLoopGroup = new EpollEventLoopGroup(childEventLoopCount,
                                    new RxDefaultThreadFactory("rx-netty-epoll-eventloop"));
    if (!nativeEventLoop.compareAndSet(null, newEventLoopGroup)) {
      newEventLoopGroup.shutdownGracefully();
    }
  }
  return nativeEventLoop.get();
}

代码示例来源:origin: io.reactivex/rxnetty

private EpollEventLoopGroup getNativeEventLoop() {
  EpollEventLoopGroup eventLoopGroup = nativeEventLoop.get();
  if (null == eventLoopGroup) {
    EpollEventLoopGroup newEventLoopGroup = new EpollEventLoopGroup(childEventLoopCount,
                                    new RxDefaultThreadFactory("rxnetty-epoll-eventloop"));
    if (!nativeEventLoop.compareAndSet(null, newEventLoopGroup)) {
      newEventLoopGroup.shutdownGracefully();
    }
  }
  return nativeEventLoop.get();
}

代码示例来源:origin: com.netflix.rxnetty/rx-netty

private EpollEventLoopGroup getNativeParentEventLoop() {
  if (nativeParentEventLoop == nativeEventLoop) { // Means using same event loop for acceptor and worker pool.
    return getNativeEventLoop();
  }
  EpollEventLoopGroup eventLoopGroup = nativeParentEventLoop.get();
  if (null == eventLoopGroup) {
    EpollEventLoopGroup newEventLoopGroup = new EpollEventLoopGroup(parentEventLoopCount,
                                    new RxDefaultThreadFactory("rx-netty-epoll-eventloop"));
    if (!nativeParentEventLoop.compareAndSet(null, newEventLoopGroup)) {
      newEventLoopGroup.shutdownGracefully();
    }
  }
  return nativeParentEventLoop.get();
}

代码示例来源:origin: io.reactivex/rxnetty

private EpollEventLoopGroup getNativeParentEventLoop() {
  if (nativeParentEventLoop == nativeEventLoop) { // Means using same event loop for acceptor and worker pool.
    return getNativeEventLoop();
  }
  EpollEventLoopGroup eventLoopGroup = nativeParentEventLoop.get();
  if (null == eventLoopGroup) {
    EpollEventLoopGroup newEventLoopGroup = new EpollEventLoopGroup(parentEventLoopCount,
                                    new RxDefaultThreadFactory("rxnetty-epoll-eventloop"));
    if (!nativeParentEventLoop.compareAndSet(null, newEventLoopGroup)) {
      newEventLoopGroup.shutdownGracefully();
    }
  }
  return nativeParentEventLoop.get();
}

相关文章

微信公众号

最新文章

更多