Search in sources :

Example 11 with PinpointThreadFactory

use of com.navercorp.pinpoint.common.util.PinpointThreadFactory in project pinpoint by naver.

the class AsyncQueueingExecutor method createExecuteThread.

private Thread createExecuteThread(String executorName) {
    final ThreadFactory threadFactory = new PinpointThreadFactory(executorName, true);
    Thread thread = threadFactory.newThread(this);
    thread.start();
    return thread;
}
Also used : PinpointThreadFactory(com.navercorp.pinpoint.common.util.PinpointThreadFactory) ThreadFactory(java.util.concurrent.ThreadFactory) PinpointThreadFactory(com.navercorp.pinpoint.common.util.PinpointThreadFactory)

Example 12 with PinpointThreadFactory

use of com.navercorp.pinpoint.common.util.PinpointThreadFactory in project pinpoint by naver.

the class PinpointServerAcceptor method createBootStrap.

private ServerBootstrap createBootStrap(int bossCount, int workerCount) {
    // profiler, collector
    ExecutorService boss = Executors.newCachedThreadPool(new PinpointThreadFactory("Pinpoint-Server-Boss"));
    NioServerBossPool nioServerBossPool = new NioServerBossPool(boss, bossCount, ThreadNameDeterminer.CURRENT);
    ExecutorService worker = Executors.newCachedThreadPool(new PinpointThreadFactory("Pinpoint-Server-Worker"));
    NioWorkerPool nioWorkerPool = new NioWorkerPool(worker, workerCount, ThreadNameDeterminer.CURRENT);
    NioServerSocketChannelFactory nioClientSocketChannelFactory = new NioServerSocketChannelFactory(nioServerBossPool, nioWorkerPool);
    return new ServerBootstrap(nioClientSocketChannelFactory);
}
Also used : NioServerBossPool(org.jboss.netty.channel.socket.nio.NioServerBossPool) NioWorkerPool(org.jboss.netty.channel.socket.nio.NioWorkerPool) NioServerSocketChannelFactory(org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory) ExecutorService(java.util.concurrent.ExecutorService) ServerBootstrap(org.jboss.netty.bootstrap.ServerBootstrap) PinpointThreadFactory(com.navercorp.pinpoint.common.util.PinpointThreadFactory)

Example 13 with PinpointThreadFactory

use of com.navercorp.pinpoint.common.util.PinpointThreadFactory 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

PinpointThreadFactory (com.navercorp.pinpoint.common.util.PinpointThreadFactory)13 ThreadFactory (java.util.concurrent.ThreadFactory)4 DatagramPacketFactory (com.navercorp.pinpoint.collector.util.DatagramPacketFactory)2 ExecutorService (java.util.concurrent.ExecutorService)2 NioWorkerPool (org.jboss.netty.channel.socket.nio.NioWorkerPool)2 Test (org.junit.Test)2 MonitoredExecutorService (com.navercorp.pinpoint.collector.monitor.MonitoredExecutorService)1 SimpleOrderedThreadPool (com.navercorp.pinpoint.web.util.SimpleOrderedThreadPool)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Configuration (org.apache.hadoop.conf.Configuration)1 TException (org.apache.thrift.TException)1 ServerBootstrap (org.jboss.netty.bootstrap.ServerBootstrap)1 NioClientBossPool (org.jboss.netty.channel.socket.nio.NioClientBossPool)1 NioClientSocketChannelFactory (org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory)1 NioServerBossPool (org.jboss.netty.channel.socket.nio.NioServerBossPool)1 NioServerSocketChannelFactory (org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory)1