use of io.dingodb.common.concurrent.ThreadPoolBuilder in project dingo by dingodb.
the class NettyServer method init.
@Override
public void init() {
server = new ServerBootstrap();
eventLoopGroup = new NioEventLoopGroup(2, new ThreadPoolBuilder().name("Netty server " + port).build());
server.localAddress(port).channel(NioServerSocketChannel.class).group(eventLoopGroup).childHandler(channelInitializer());
}
use of io.dingodb.common.concurrent.ThreadPoolBuilder in project dingo by dingodb.
the class AbstractNettyConnection method open.
@Override
public void open() throws InterruptedException {
ThreadPoolExecutor executor = new ThreadPoolBuilder().name("Netty connection " + remoteAddress).build();
bootstrap = new Bootstrap();
eventLoopGroup = new NioEventLoopGroup(0, executor);
bootstrap.channel(NioSocketChannel.class).group(eventLoopGroup).remoteAddress(remoteAddress).handler(channelInitializer());
bootstrap.connect().sync().await();
localAddress = nettyChannel.localAddress();
handshake();
}
Aggregations