Package java.util.concurrent

Examples of java.util.concurrent.ScheduledThreadPoolExecutor


        _securityManager = new SecurityManager(parentSecurityManager, _vhostConfig.getConfig().getString("security.acl"), _name);

        _connectionRegistry = new ConnectionRegistry();
        _connectionRegistry.addRegistryChangeListener(this);

        _houseKeepingTasks = new ScheduledThreadPoolExecutor(_vhostConfig.getHouseKeepingThreadCount());


        _queueRegistry = new DefaultQueueRegistry(this);

        _queueFactory = new AMQQueueFactory(this, _queueRegistry);
View Full Code Here


            public String toString() {
                return "NettoSphereAsyncSupport";
            }
        });
       
        suspendTimer = new ScheduledThreadPoolExecutor(Runtime.getRuntime().availableProcessors());
        webSocketProcessor = WebSocketProcessorFactory.getDefault().getWebSocketProcessor(framework);

        if (config.supportChunking()) {
            channelBufferPool = new ChannelBufferPool(0, config.writeBufferPoolSize(),
                    config.writeBufferPoolCleanupFrequency(), framework.getAtmosphereConfig());
View Full Code Here

         threadPool = Executors.newFixedThreadPool(configuration.getThreadPoolMaxSize(), tFactory);
      }

      executorFactory = new OrderedExecutorFactory(threadPool);

      scheduledPool = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(),
                                                      new HornetQThreadFactory("HornetQ-scheduled-threads",
                                                                               false,
                                                                               getThisClassLoader()));

      managementService = new ManagementServiceImpl(mbeanServer, configuration);
View Full Code Here

                return t;
            }

        };
        m_syncThread = MoreExecutors.listeningDecorator(
                new ScheduledThreadPoolExecutor(
                1,
                tf));

        tf = new ThreadFactory() {
            private final AtomicInteger m_counter = new AtomicInteger();
View Full Code Here

     * @param task the task to execute upon timout, cannot be <code>null</code>;
     * @param timeout the timeout value, > 0;
     * @param unit the time unit of the timeout value, cannot be <code>null</code>.
     */
    public ResettableTimer(Runnable task, long timeout, TimeUnit unit) {
        this(new ScheduledThreadPoolExecutor(1), task, timeout, unit);
    }
View Full Code Here

  }

  @Override
  public void init() throws ServiceException {
    int threads = getServiceConfig().getInt(CONF_THREADS, 5);
    scheduler = new ScheduledThreadPoolExecutor(threads);
    LOG.debug("Scheduler started");
  }
View Full Code Here

  public BatchApnsService(ApnsConnection prototype, ApnsFeedbackConnection feedback, int batchWaitTimeInSec, int maxBachWaitTimeInSec, ThreadFactory tf) {
    super(feedback);
    this.prototype = prototype;
    this.batchWaitTimeInSec = batchWaitTimeInSec;
    this.maxBatchWaitTimeInSec = maxBachWaitTimeInSec;
    this.scheduleService = new ScheduledThreadPoolExecutor(1, tf == null ? Executors.defaultThreadFactory() : tf);
  }
View Full Code Here

  public HBaseFsck(Configuration conf) throws MasterNotRunningException,
      ZooKeeperConnectionException, IOException {
    this.conf = conf;

    int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS);
    executor = new ScheduledThreadPoolExecutor(numThreads);
  }
View Full Code Here

    }

    public static ScheduledExecutorService newSingleThreadScheduledExecutor(
            String poolName
    ) {
        return new ScheduledThreadPoolExecutor(
                1,
                new SshdThreadFactory(poolName));
    }
View Full Code Here

    ThreadFactory threadFactory = new ThreadFactoryBuilder()
      .setNameFormat("Job Fail Wait Timeout Monitor #%d")
      .setDaemon(true)
      .build();
    this.executor = new ScheduledThreadPoolExecutor(1, threadFactory);

    // This "this leak" is okay because the retained pointer is in an
    //  instance variable.
    stateMachine = stateMachineFactory.make(this);
    this.forcedState  = forcedState;
View Full Code Here

TOP

Related Classes of java.util.concurrent.ScheduledThreadPoolExecutor

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.