本文整理了Java中io.netty.channel.epoll.EpollEventLoopGroup.shutdownGracefully()
方法的一些代码示例,展示了EpollEventLoopGroup.shutdownGracefully()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EpollEventLoopGroup.shutdownGracefully()
方法的具体详情如下:
包路径:io.netty.channel.epoll.EpollEventLoopGroup
类名称: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();
}
内容来源于网络,如有侵权,请联系作者删除!