org.jboss.netty.channel.socket.nio.NioServerBossPool Java Examples
The following examples show how to use
org.jboss.netty.channel.socket.nio.NioServerBossPool.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PinpointServerAcceptor.java From pinpoint with Apache License 2.0 | 5 votes |
private ServerBootstrap createBootStrap(int bossCount, int workerCount) { // profiler, collector ExecutorService boss = Executors.newCachedThreadPool(new PinpointThreadFactory("Pinpoint-Server-Boss", true)); NioServerBossPool nioServerBossPool = new NioServerBossPool(boss, bossCount, ThreadNameDeterminer.CURRENT); ExecutorService worker = Executors.newCachedThreadPool(new PinpointThreadFactory("Pinpoint-Server-Worker", true)); NioWorkerPool nioWorkerPool = new NioWorkerPool(worker, workerCount, ThreadNameDeterminer.CURRENT); NioServerSocketChannelFactory nioClientSocketChannelFactory = new NioServerSocketChannelFactory(nioServerBossPool, nioWorkerPool); return new ServerBootstrap(nioClientSocketChannelFactory); }