本文整理了Java中io.netty.channel.nio.NioEventLoopGroup.executorCount()
方法的一些代码示例,展示了NioEventLoopGroup.executorCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NioEventLoopGroup.executorCount()
方法的具体详情如下:
包路径:io.netty.channel.nio.NioEventLoopGroup
类名称:NioEventLoopGroup
方法名:executorCount
暂无
代码示例来源:origin: kpavlov/jreactive-8583
protected EventLoopGroup createWorkerEventLoopGroup() {
final NioEventLoopGroup group = new NioEventLoopGroup(configuration.getWorkerThreadsCount());
logger.debug("Created worker EventLoopGroup with {} executor threads", group.executorCount());
return group;
}
代码示例来源:origin: waterguo/antsdb
@Override
public void start(int port) throws Exception {
this.bossGroup = new NioEventLoopGroup(this.bossGroupSize);
this.workerGroup = new NioEventLoopGroup(this.workerGroupSize);
_log.info("netty worker pool size: {}", workerGroup.executorCount());
ServerBootstrap b = new ServerBootstrap();
b.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.childHandler(new MysqlChannelInitializer(this.fish))
.option(ChannelOption.SO_BACKLOG, 128)
.childOption(ChannelOption.SO_SNDBUF, 16 * 1024)
.childOption(ChannelOption.SO_KEEPALIVE, true);
// Bind and start to accept incoming connections.
_log.info("starting netty listener on port: {}", port);
b.bind(port).sync();
}
内容来源于网络,如有侵权,请联系作者删除!