Examples of HashedWheelTimer


Examples of com.facebook.presto.jdbc.internal.netty.util.HashedWheelTimer

        checkNotNull(config, "config is null");

        String prefix = "netty-client-" + name + "-io-";

        String nameFormat = prefix + "timer-%s";
        this.hashedWheelTimer = new HashedWheelTimer(daemonThreadsNamed(nameFormat));

        // Give netty infinite thread "sources" for worker and boss.
        // 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"));
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.util.HashedWheelTimer

        this.requestFilters = ImmutableList.copyOf(requestFilters);

        String namePrefix = "http-client-" + name;

        // shared timer for channel factory and read timeout channel handler
        this.timer = new HashedWheelTimer(daemonThreadsNamed(namePrefix + "-timer-%s"));

        ChannelFactory channelFactory = new NioClientSocketChannelFactory(ioPool.getBossPool(), ioPool.getWorkerPool());

        ThreadFactory workerThreadFactory = daemonThreadsNamed(namePrefix + "-worker-%s");
        this.executor = new OrderedMemoryAwareThreadPoolExecutor(asyncConfig.getWorkerThreads(), 0, 0, 30, TimeUnit.SECONDS, workerThreadFactory);
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.util.HashedWheelTimer

     *
     * @param bossExecutor  the Executor to use for server the {@link NioClientBoss}
     * @param bossCount     the number of {@link NioClientBoss} instances this {@link NioClientBoss} will hold
     */
    public NioClientBossPool(Executor bossExecutor, int bossCount) {
        this(bossExecutor, bossCount, new HashedWheelTimer(), null);
        stopTimer = true;
    }
View Full Code Here

Examples of com.taobao.gecko.service.timer.HashedWheelTimer

        this.idWorker = idWorker;
        this.storeManager = storeManager;
        this.transactionStore = transactionStore;
        this.statsManager = stasManager;
        this.txTimeoutTimer =
                new HashedWheelTimer(new NamedThreadFactory("Tx-Timeout-Timer"), 500, TimeUnit.MILLISECONDS, 512,
                    metaConfig.getMaxTxTimeoutTimerCapacity());
        MetaMBeanServer.registMBean(this, null);
        this.scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
        this.scheduleWriteHeuristicTransactions(metaConfig);
    }
View Full Code Here

Examples of io.netty.util.HashedWheelTimer

    protected TimeUnit unit;
    protected ConnectionEvents connectionEvents = new ConnectionEvents();
    protected Set<Closeable> closeableResources = new ConcurrentSet<Closeable>();

    protected AbstractRedisClient() {
        timer = new HashedWheelTimer();
        eventLoopGroup = new NioEventLoopGroup(DEFAULT_EVENT_LOOP_THREADS);
        channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
        timer.start();
    }
View Full Code Here

Examples of io.netty.util.HashedWheelTimer

    protected TimeUnit unit;
    protected ConnectionEvents connectionEvents = new ConnectionEvents();
    protected Set<Closeable> closeableResources = new ConcurrentSet<Closeable>();

    public AbstractRedisClient() {
        timer = new HashedWheelTimer();
        group = new NioEventLoopGroup();
        channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
        timer.start();
    }
View Full Code Here

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

Examples of org.jboss.netty.util.HashedWheelTimer

      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

Examples of org.jboss.netty.util.HashedWheelTimer

  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

Examples of org.jboss.netty.util.HashedWheelTimer

        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
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.