Examples of NamedThreadFactory


Examples of com.linkedin.databus.core.util.NamedThreadFactory

    }

    int consumerParallelism = connConfig.getConsumerParallelism();
    if (1 == consumerParallelism) {
      _consumerCallbackExecutor = Executors
          .newSingleThreadExecutor(new NamedThreadFactory("callback"));
    } else {
      _consumerCallbackExecutor = Executors.newFixedThreadPool(
          consumerParallelism, new NamedThreadFactory("callback"));
    }

    LoggingConsumer loggingConsumer = null;
    if (serverHandle != null)
    {
View Full Code Here

Examples of com.linkedin.databus.core.util.NamedThreadFactory

      private final ChannelGroup _channelGroup; //provides automatic channel closure on shutdown

      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 com.linkedin.databus.core.util.NamedThreadFactory

       ioThreadsConfig.getKeepAliveMs(),
       TimeUnit.MILLISECONDS,
       ioThreadsConfig.getMaxQueueSize() <= 0 ?
           new LinkedBlockingQueue<Runnable>() :
           new ArrayBlockingQueue<Runnable>(ioThreadsConfig.getMaxQueueSize()));*/
   _ioExecutorService = Executors.newCachedThreadPool(new NamedThreadFactory("io" + _containerStaticConfig.getId()));
   _bossExecutorService = Executors.newCachedThreadPool(new NamedThreadFactory("boss" + _containerStaticConfig.getId()));

    _defaultExecutorService =
      new OrderedMemoryAwareThreadPoolExecutor(runtimeConfig.getDefaultExecutor().getMaxThreadsNum(),
                             0,
                             0,
                             runtimeConfig.getDefaultExecutor().getKeepAliveMs(),
                             TimeUnit.MILLISECONDS,
                             new NamedThreadFactory("worker" + _containerStaticConfig.getId()));

   _containerStatsCollector = _containerStaticConfig.getOrCreateContainerStatsCollector();
    DbusEventsStatisticsCollector inboundEventStatisticsCollector = new AggregatedDbusEventsStatisticsCollector(getContainerStaticConfig().getId(),
                                                        "eventsInbound",
                                                        true,
View Full Code Here

Examples of com.linkedin.databus.core.util.NamedThreadFactory

    _trailFileLocator = new TrailFileNotifier(_dir, _trailFileManager, _latestFile, 10, this);
    _rateMonitor.start();
    _rateMonitor.suspend();

    // start timer to collect stats
    _executor = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("StatsTime for " + dir, true)); // add directory to the thread name
    _executor.scheduleWithFixedDelay( new Runnable() {
      @Override
      public void run() {
        updateParserStats();
      }
View Full Code Here

Examples of com.linkedin.databus.core.util.NamedThreadFactory

    /** Create new threadpools and timer **/
    public DatabusClientNettyThreadPools(int id)
    {
      // connection factory
      _timer = new HashedWheelTimer(5, TimeUnit.MILLISECONDS);
      _ioExecutorService = Executors.newCachedThreadPool(new NamedThreadFactory("io" + id ));
      _bossExecutorService = Executors.newCachedThreadPool(new NamedThreadFactory("boss" + id ));
      _channelGroup = new DefaultChannelGroup();
    }
View Full Code Here

Examples of com.linkedin.databus.core.util.NamedThreadFactory

        Timer timer,
        ExecutorService bossExecutorService,
        ExecutorService ioExecutorService, ChannelGroup channelGroup)
    {
      _timer = (timer != null) ? timer :  new HashedWheelTimer(5, TimeUnit.MILLISECONDS);
      _bossExecutorService = (bossExecutorService != null) ? bossExecutorService : Executors.newCachedThreadPool(new NamedThreadFactory("io" + id));
      _ioExecutorService = (ioExecutorService != null) ? ioExecutorService : Executors.newCachedThreadPool(new NamedThreadFactory("boss" + id )) ;
      _channelGroup = (channelGroup != null) ?  channelGroup :  new DefaultChannelGroup() ;
    }
View Full Code Here

Examples of com.linkedin.databus.core.util.NamedThreadFactory

                config,
                bootstrapConfig);
        _cleaners.put(source,cleaner);
      }
    }
    ThreadFactory tf = new NamedThreadFactory(name);
    _cleanerThreadPoolService = Executors.newCachedThreadPool(tf);
    _cleanerFutures =  new HashMap<String, Future<?>>();
    LOG.info("Cleaner Config is :" + _cleanerConfig);
  }
View Full Code Here

Examples of com.linkedin.r2.util.NamedThreadFactory

    _directory = new ZKFSDirectory(basePath);

    _shutdownAsynchronously = shutdownAsynchronously;
    _isSymlinkAware = isSymlinkAware;

    _executor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("D2 PropertyEventExecutor"));
    _keyMapper = new ConsistentHashKeyMapper(this, this);
    _delayedExecution = 1000;
  }
View Full Code Here

Examples of com.sun.sgs.impl.util.NamedThreadFactory

        // NOTE: this is replicating previous behavior where there is a
        // fixed-size pool for running tasks, but in practice we may
        // want a flexible pool that allows (e.g.) for tasks that run
        // for the lifetime of a stack
        this.executor = Executors.newScheduledThreadPool(
                requestedThreads, new NamedThreadFactory("TaskScheduler"));

        logger.log(Level.CONFIG,
                   "Created TaskSchedulerImpl with properties:" +
                   "\n  " + CONSUMER_THREADS_PROPERTY + "=" + requestedThreads);
    }
View Full Code Here

Examples of com.taobao.metamorphosis.utils.NamedThreadFactory

        metaConfig.addTopic(Constants.TEST_SLAVE_TOPIC, topicConfig);
        // slave��ע�ᵽzk,ǿ��
        metaMorphosisBroker.getBrokerZooKeeper().getZkConfig().zkEnable = false;
        this.orderedPutExecutor =
                new OrderedThreadPoolExecutor(metaConfig.getPutProcessThreadCount(),
                    metaConfig.getPutProcessThreadCount(), 60, TimeUnit.SECONDS, new NamedThreadFactory("putProcessor"));
        final GregorCommandProcessor processor =
                new GregorCommandProcessor(metaMorphosisBroker.getStoreManager(),
                    metaMorphosisBroker.getExecutorsManager(), metaMorphosisBroker.getStatsManager(),
                    metaMorphosisBroker.getRemotingServer(), metaMorphosisBroker.getMetaConfig(),
                    metaMorphosisBroker.getIdWorker(), metaMorphosisBroker.getBrokerZooKeeper(),
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.