Package java.util.concurrent

Examples of java.util.concurrent.ScheduledThreadPoolExecutor


   * has removed a region dir before the corruption checker got to it.
   */
  @Test(timeout=180000)
  public void testQuarantineMissingRegionDir() throws Exception {
    TableName table = TableName.valueOf(name.getMethodName());
    ExecutorService exec = new ScheduledThreadPoolExecutor(10);
    // inject a fault in the hfcc created.
    final FileSystem fs = FileSystem.get(conf);
    HBaseFsck hbck = new HBaseFsck(conf, exec) {
      @Override
      public HFileCorruptionChecker createHFileCorruptionChecker(boolean sidelineCorruptHFiles) throws IOException {
View Full Code Here


        }

        eventSupport = new TaskEventSupport();
        eventKeys = new EventKeys();
        eventSupport.addEventListener(new MessagingTaskEventListener(eventKeys));
        scheduler = new ScheduledThreadPoolExecutor(3);

        long now = System.currentTimeMillis();
        for (Object object : em.createNamedQuery("UnescalatedDeadlines").getResultList()) {
            DeadlineSummary summary = (DeadlineSummary) object;
            schedule(new ScheduledTaskDeadline(summary.getTaskId(),
View Full Code Here

    public JDKTimerService() {
        this( 1 );
    }

    public JDKTimerService(int size) {
        this.scheduler = new ScheduledThreadPoolExecutor( size );
    }
View Full Code Here

    public JDKTimerService() {
        this( 1 );
    }

    public JDKTimerService(int size) {
        this.scheduler = new ScheduledThreadPoolExecutor( size );
    }
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

      {
         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

        //noinspection unchecked
        Collection<URI> webURIs =
                (Collection<URI>) context.getAttribute("com.sun.faces.webresources");
        if (isDevModeEnabled() && webURIs != null && !webURIs.isEmpty()) {
            webResourcePool = new ScheduledThreadPoolExecutor(1, new MojarraThreadFactory("WebResourceMonitor"));
            webResourcePool.scheduleAtFixedRate(new WebConfigResourceMonitor(context, webURIs),
                    2000,
                    2000,
                    TimeUnit.MILLISECONDS);
        }
View Full Code Here

     * @throws RepositoryException if there is already another repository
     *                             instance running on the given configuration
     *                             or another error occurs.
     */
    protected RepositoryImpl(RepositoryConfig repConfig) throws RepositoryException {
        ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(
                Runtime.getRuntime().availableProcessors() * 2,
                new ThreadPoolExecutor.CallerRunsPolicy());
        this.executor = executor;

        // Acquire a lock on the repository home
View Full Code Here

        _virtualHostMBean = new VirtualHostMBean();

        _connectionRegistry = new ConnectionRegistry();

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

        _queueRegistry = new DefaultQueueRegistry(this);

        _exchangeFactory = new DefaultExchangeFactory(this);
        _exchangeFactory.initialise(_configuration);
View Full Code Here

        this.clockDaemon = clockDaemon;
    }

    public ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor() {
        if (clockDaemon == null) {
            clockDaemon = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
                public Thread newThread(Runnable runnable) {
                    Thread thread = new Thread(runnable, "ActiveMQ Cleanup Timer");
                    thread.setDaemon(true);
                    return thread;
                }
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.