Examples of DaemonThreadFactory


Examples of br.com.arbo.java.util.concurrent.DaemonThreadFactory

  public static void main(final String... args) {
    new Main().run();
  }

  private Main() {
    final ThreadFactory threadFactory = new DaemonThreadFactory();
    sequential = new Sequential(threadFactory).make();
    parallel = new Parallel(threadFactory).make();
    dumb = new Dumb().make();
  }
View Full Code Here

Examples of com.alee.utils.concurrent.DaemonThreadFactory

            {
                executorService.shutdown ();
            }
            if ( amount > 0 )
            {
                executorService = Executors.newFixedThreadPool ( amount, new DaemonThreadFactory () );
            }
            else
            {
                executorService = null;
            }
View Full Code Here

Examples of com.alibaba.druid.util.DaemonThreadFactory

        Runnable task = new Runnable() {
            public void run() {
               
            }
        };
        DaemonThreadFactory factory = new DaemonThreadFactory("test");
        Assert.assertEquals("[test-1]", factory.newThread(task).getName());
        Assert.assertEquals("[test-2]", factory.newThread(task).getName());
    }
View Full Code Here

Examples of com.blacklocus.jres.util.DaemonThreadFactory

        this.targetIndex = targetIndex;
        this.targetType = targetType;
        this.jres = jres;

        this.executorService = new ThreadPoolExecutor(
                2, 2, 1, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), new DaemonThreadFactory()
        );

        this.q = new SynchronousQueue<FuturedDocument>(true);
    }
View Full Code Here

Examples of hudson.util.DaemonThreadFactory

         reactor.addAll(InitMilestone.ordering().discoverTasks(reactor));

        ExecutorService es;
        if (Jenkins.PARALLEL_LOAD)
            es = new ThreadPoolExecutor(
                TWICE_CPU_NUM, TWICE_CPU_NUM, 5L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new DaemonThreadFactory());
        else
            es = Executors.newSingleThreadExecutor(new DaemonThreadFactory());
        try {
            reactor.execute(es,buildReactorListener());
        } finally {
            es.shutdownNow();   // upon a successful return the executor queue should be empty. Upon an exception, we want to cancel all pending tasks
        }
View Full Code Here

Examples of krati.util.DaemonThreadFactory

     * Note that this method is called only by SimpleDataArray.
     */
    final void start() {
        _enabled = true;
        _ignoredSegs.clear();
        _executor = Executors.newSingleThreadExecutor(new DaemonThreadFactory());
        _executor.execute(this);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.DaemonThreadFactory

        RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_KEY,
        RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT);
      int threads = conf.getInt(CONCURENT_SNAPSHOT_TASKS_KEY, DEFAULT_CONCURRENT_SNAPSHOT_TASKS);
      this.name = name;
      executor = new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.MILLISECONDS,
          new LinkedBlockingQueue<Runnable>(), new DaemonThreadFactory("rs("
              + name + ")-snapshot-pool"));
      taskPool = new ExecutorCompletionService<Void>(executor);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.DaemonThreadFactory

  public static ThreadPoolExecutor defaultPool(long wakeFrequency, long keepAlive,
      int procThreads, String memberName) {
    return new ThreadPoolExecutor(1, procThreads, keepAlive, TimeUnit.SECONDS,
        new SynchronousQueue<Runnable>(),
        new DaemonThreadFactory("member: '" + memberName + "' subprocedure-pool"));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.DaemonThreadFactory

   */
  public static ThreadPoolExecutor defaultPool(String coordName, long keepAliveTime, int opThreads,
      long wakeFrequency) {
    return new ThreadPoolExecutor(1, opThreads, keepAliveTime, TimeUnit.SECONDS,
        new SynchronousQueue<Runnable>(),
        new DaemonThreadFactory("(" + coordName + ")-proc-coordinator-pool"));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.DaemonThreadFactory

   */
  public static ThreadPoolExecutor defaultPool(String coordName, int opThreads,
      long keepAliveMillis) {
    return new ThreadPoolExecutor(1, opThreads, keepAliveMillis, TimeUnit.MILLISECONDS,
        new SynchronousQueue<Runnable>(),
        new DaemonThreadFactory("(" + coordName + ")-proc-coordinator-pool"));
  }
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.