Search in sources :

Example 6 with NioWorkerPool

use of org.jboss.netty.channel.socket.nio.NioWorkerPool in project pinpoint by naver.

the class DefaultPinpointClientFactory method createChannelFactory.

private NioClientSocketChannelFactory createChannelFactory(int bossCount, int workerCount, Timer timer) {
    ExecutorService boss = Executors.newCachedThreadPool(new PinpointThreadFactory("Pinpoint-Client-Boss", true));
    NioClientBossPool bossPool = new NioClientBossPool(boss, bossCount, timer, ThreadNameDeterminer.CURRENT);
    ExecutorService worker = Executors.newCachedThreadPool(new PinpointThreadFactory("Pinpoint-Client-Worker", true));
    NioWorkerPool workerPool = new NioWorkerPool(worker, workerCount, ThreadNameDeterminer.CURRENT);
    return new NioClientSocketChannelFactory(bossPool, workerPool);
}
Also used : NioClientBossPool(org.jboss.netty.channel.socket.nio.NioClientBossPool) NioWorkerPool(org.jboss.netty.channel.socket.nio.NioWorkerPool) NioClientSocketChannelFactory(org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory) ExecutorService(java.util.concurrent.ExecutorService) PinpointThreadFactory(com.navercorp.pinpoint.common.util.PinpointThreadFactory)

Aggregations

NioWorkerPool (org.jboss.netty.channel.socket.nio.NioWorkerPool)6 ExecutorService (java.util.concurrent.ExecutorService)3 NioClientBossPool (org.jboss.netty.channel.socket.nio.NioClientBossPool)3 NioClientSocketChannelFactory (org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory)3 PinpointThreadFactory (com.navercorp.pinpoint.common.util.PinpointThreadFactory)2 ClientBootstrap (org.jboss.netty.bootstrap.ClientBootstrap)2 ServerBootstrap (org.jboss.netty.bootstrap.ServerBootstrap)2 NioServerBossPool (org.jboss.netty.channel.socket.nio.NioServerBossPool)2 NioServerSocketChannelFactory (org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory)2 IOException (java.io.IOException)1 InetAddress (java.net.InetAddress)1 InetSocketAddress (java.net.InetSocketAddress)1 Executor (java.util.concurrent.Executor)1 ThreadFactory (java.util.concurrent.ThreadFactory)1 TSDB (net.opentsdb.core.TSDB)1 PipelineFactory (net.opentsdb.tsd.PipelineFactory)1 RpcManager (net.opentsdb.tsd.RpcManager)1 Config (net.opentsdb.utils.Config)1 Threads (net.opentsdb.utils.Threads)1 DirectChannelBufferFactory (org.jboss.netty.buffer.DirectChannelBufferFactory)1