Package com.linkedin.databus.core.util

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


      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

       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

    _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

    /** 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

        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

                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

TOP

Related Classes of com.linkedin.databus.core.util.NamedThreadFactory

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.