Package org.jboss.netty.util

Examples of org.jboss.netty.util.HashedWheelTimer


        bootstrap.setOption("remoteAddress", addr);

        setDefaultTimeout(60, TimeUnit.SECONDS);

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


      public TestClientConnectionFactory(
          DatabusHttpClientImpl.StaticConfig clientConfig)
      {
        _bossThreadPool = Executors.newCachedThreadPool(new NamedThreadFactory("boss"));;
        _ioThreadPool = Executors.newCachedThreadPool(new NamedThreadFactory("io"));;
        _timeoutTimer = new HashedWheelTimer(5, TimeUnit.MILLISECONDS);
        _clientConfig = clientConfig;
        _channelFactory = new NioClientSocketChannelFactory(_bossThreadPool, _ioThreadPool);
        _channelGroup = new DefaultChannelGroup();;
      }
View Full Code Here

  throws IOException, InvalidConfigException, DatabusException
  {
   _containerStaticConfig = config;
   _baseDir = config.getContainerBaseDir();
   //by default we have 5ms timeout precision
   _networkTimeoutTimer = new HashedWheelTimer(5, TimeUnit.MILLISECONDS);

   _processorRegistry = new RequestProcessorRegistry();
   _commandsRegistry = new CommandsRegistry();

   _mbeanServer = _containerStaticConfig.getOrCreateMBeanServer();
View Full Code Here

        bind(ProcessBuffer.class).toProvider(ProcessBufferProvider.class);
        bind(NodeId.class).toProvider(NodeIdProvider.class);

        bind(ServiceManager.class).toProvider(ServiceManagerProvider.class).asEagerSingleton();

        bind(HashedWheelTimer.class).toInstance(new HashedWheelTimer());
        bind(ThroughputCounter.class);

        bind(EventBus.class).toProvider(EventBusProvider.class).in(Scopes.SINGLETON);
    }
View Full Code Here

    }

    @Override
    protected void doStart() throws Exception {
        if (timer == null) {
            HashedWheelTimer hashedWheelTimer = new HashedWheelTimer();
            hashedWheelTimer.start();
            timer = hashedWheelTimer;
        }

        if (configuration == null) {
            configuration = new NettyConfiguration();
View Full Code Here

    }

    @Override
    protected void doStart() throws Exception {
        if (timer == null) {
            timer = new HashedWheelTimer();
        }

        if (configuration == null) {
            configuration = new NettyConfiguration();
        }
View Full Code Here

    /**
     * Creates a new boss pool.
     */
    BossPool build() {
        return new NioClientBossPool(Executors.newCachedThreadPool(), bossCount, new HashedWheelTimer(), new CamelNettyThreadNameDeterminer(pattern, name));
    }
View Full Code Here

    ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
    ThreadFactory bossFactory = builder.setNameFormat(name + " Boss #%d").build();
    ThreadFactory workerFactory = builder.setNameFormat(name + " Worker #%d").build();

    NioClientBossPool bossPool = new NioClientBossPool(Executors.newCachedThreadPool(bossFactory), 1,
        new HashedWheelTimer(), ThreadNameDeterminer.CURRENT);
    NioWorkerPool workerPool = new NioWorkerPool(Executors.newCachedThreadPool(workerFactory), workerNum,
        ThreadNameDeterminer.CURRENT);

    return new NioClientSocketChannelFactory(bossPool, workerPool);
  }
View Full Code Here

        this(processor, new ThriftServerConfig());
    }

    public ThriftServer(TProcessor processor, ThriftServerConfig config)
    {
        this(processor, config, new HashedWheelTimer());
    }
View Full Code Here

    // Configure the event pipeline factory.
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
      public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline p = Channels.pipeline();
        timer = new HashedWheelTimer();
        p.addLast("frameDecoder", new NettyFrameDecoder());
        p.addLast("frameEncoder", new NettyFrameEncoder());
        p.addLast("handler", new NettyClientWaspHandler());
        p.addLast(
            "readTimeout",
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.