Package org.jboss.netty.util

Examples of org.jboss.netty.util.HashedWheelTimer


    }

    private void startServer(final ThriftServerDefBuilder thriftServerDefBuilder)
    {
        server = new NettyServerTransport(thriftServerDefBuilder.build(), new NettyConfigBuilder(),
                    new DefaultChannelGroup(), new HashedWheelTimer());
        server.start();
        port = ((InetSocketAddress)server.getServerChannel().getLocalAddress()).getPort();
    }
View Full Code Here


        instance = null;
    }
   
    public static Timer getTimer() {
        if(instance == null) {
            instance = new HashedWheelTimer();
        }
        return instance;
    }
View Full Code Here

    this.password = password;
    this.executor = exec;
   
    this.proxySettings = proxy;

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

    boot = new ClientBootstrap(channelFactory);
View Full Code Here

    public GamePipeFactory(int readSize, int maxReadSize, boolean hasReadSize, int writeSize, boolean hasWriteSize, int timeOut) {
        GameBufferFactory.setupGameBuffer(readSize, hasReadSize, writeSize, hasWriteSize);
        this.maxReadSize = maxReadSize;
        this.readOffset = hasReadSize ? 0 : readSize;
        this.timeOut = timeOut;
        timeoutHandler = new HashedWheelTimer();
    }
View Full Code Here

      this.entries = new ConcurrentHashMap<String, Map<String, Object>>();
      //this.entries = new ConcurrentHashMap<String, Object>();
      this.pool = new ForkJoinPool();
      this.observerTask = new ObserverTask<Integer, org.flowforwarding.warp.jcontroller.restapi.RestApiTask>();
     
      Timer timer = new HashedWheelTimer();
     
       this.handlerTask = new ChannelHandler(timer, 0, 0, 20);
      //this.handlerTask = new ChannelHandler();
           
      this.pool.execute(observerTask);
View Full Code Here

            }
        });

        serverBootstrap.bind(HOST_ADDR);

        timer = new HashedWheelTimer();
    }
View Full Code Here

            int bossCount = componentSettings.getAsInt("boss_count", 1);
            clientBootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
                    Executors.newCachedThreadPool(daemonThreadFactory(settings, "transport_client_boss")),
                    bossCount,
                    new NioWorkerPool(Executors.newCachedThreadPool(daemonThreadFactory(settings, "transport_client_worker")), workerCount),
                    new HashedWheelTimer(daemonThreadFactory(settings, "transport_client_timer"))));
        }
        clientBootstrap.setPipelineFactory(configureClientChannelPipelineFactory());
        clientBootstrap.setOption("connectTimeoutMillis", connectTimeout.millis());

        String tcpNoDelay = componentSettings.get("tcp_no_delay", settings.get(TCP_NO_DELAY, "true"));
View Full Code Here

   
//    final Executor nettyExecutor = Executors.newFixedThreadPool(100);

    this.proxySettings = proxy;

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

    boot = new ClientBootstrap(channelFactory);
View Full Code Here

    this.password = password;
    this.executor = exec;
   
    this.proxySettings = proxy;

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

    boot = new ClientBootstrap(channelFactory);
View Full Code Here

TOP

Related Classes of org.jboss.netty.util.HashedWheelTimer

Copyright © 2018 www.massapicom. 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.