Examples of NioWorkerPool


Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

        this.defaultSocksProxyAddress = nettyClientConfig.getDefaultSocksProxyAddress();

        int bossThreadCount = nettyClientConfig.getBossThreadCount();
        int workerThreadCount = nettyClientConfig.getWorkerThreadCount();

        NioWorkerPool workerPool = new NioWorkerPool(workerExecutor, workerThreadCount, ThreadNameDeterminer.CURRENT);
        NioClientBossPool bossPool = new NioClientBossPool(bossExecutor, bossThreadCount, timer, ThreadNameDeterminer.CURRENT);

        this.channelFactory = new NioClientSocketChannelFactory(bossPool, workerPool);
    }
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

         {
            synchronized (nioWorkerPoolGuard)
            {
               if (nioWorkerPool == null)
               {
                  nioWorkerPool = new NioWorkerPool(threadPool, threadsToUse, null);
               }
               if(nioBossPool == null)
               {
                  //only used for connect so 1 will do
                  nioBossPool = new NioClientBossPool(virtualExecutor, 1);
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

         {
            synchronized (nioWorkerPoolGuard)
            {
               if (nioWorkerPool == null)
               {
                  nioWorkerPool = new NioWorkerPool(threadPool, threadsToUse, null);
               }
               if (nioBossPool == null)
               {
                  //only used for connect so 1 will do
                  nioBossPool = new NioClientBossPool(virtualExecutor, 1);
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

                                                                 "router-client-worker-thread-%d");

    clientBootstrap = new ClientBootstrap(
      new NioClientSocketChannelFactory(
        new NioClientBossPool(clientBossExecutor, clientBossThreadPoolSize),
        new ShareableWorkerPool<NioWorker>(new NioWorkerPool(clientWorkerExecutor, clientWorkerThreadPoolSize))));

    clientBootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
      public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeline = Channels.pipeline();
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

    this.proxySettings = proxy;

    timer = new HashedWheelTimer();
   
    channelFactory = new NioClientSocketChannelFactory(
        executor, 1, new NioWorkerPool(executor, DEFAULT_IO_THREADS), timer);

    boot = new ClientBootstrap(channelFactory);

    if (proxySettings == null) {
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

        // Netty will name the threads and will size the pool appropriately
        this.bossExecutor = newCachedThreadPool(daemonThreadsNamed(prefix + "boss-%s"));
        this.workerExecutor = newCachedThreadPool(daemonThreadsNamed(prefix + "worker-%s"));

        this.bossPool = new NioClientBossPool(bossExecutor, config.getIoBossThreads(), hashedWheelTimer, ThreadNameDeterminer.CURRENT);
        this.workerPool = new NioWorkerPool(workerExecutor, config.getIoWorkerThreads(), ThreadNameDeterminer.CURRENT);
    }
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

    this.proxySettings = proxy;

    timer = new HashedWheelTimer();
   
    channelFactory = new NioClientSocketChannelFactory(
        executor, 1, new NioWorkerPool(executor, DEFAULT_IO_THREADS), timer);

    boot = new ClientBootstrap(channelFactory);

    if (proxySettings == null) {
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

    this.proxySettings = proxy;

    timer = new HashedWheelTimer();
   
    channelFactory = new NioClientSocketChannelFactory(
        executor, 1, new NioWorkerPool(executor, DEFAULT_IO_THREADS), timer);

    boot = new ClientBootstrap(channelFactory);

    if (proxySettings == null) {
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

        int bossThreadCount = nettyServerConfig.getBossThreadCount();
        ioWorkerExecutor = nettyServerConfig.getWorkerExecutor();
        int ioWorkerThreadCount = nettyServerConfig.getWorkerThreadCount();

        channelFactory = new NioServerSocketChannelFactory(new NioServerBossPool(bossExecutor, bossThreadCount, ThreadNameDeterminer.CURRENT),
                                                           new NioWorkerPool(ioWorkerExecutor, ioWorkerThreadCount, ThreadNameDeterminer.CURRENT));
        start(channelFactory);
    }
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioWorkerPool

        this.defaultSocksProxyAddress = nettyClientConfig.getDefaultSocksProxyAddress();

        int bossThreadCount = nettyClientConfig.getBossThreadCount();
        int workerThreadCount = nettyClientConfig.getWorkerThreadCount();

        NioWorkerPool workerPool = new NioWorkerPool(workerExecutor, workerThreadCount, ThreadNameDeterminer.CURRENT);
        NioClientBossPool bossPool = new NioClientBossPool(bossExecutor, bossThreadCount, timer, ThreadNameDeterminer.CURRENT);

        this.channelFactory = new NioClientSocketChannelFactory(bossPool, workerPool);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.