Java ThreadPoolExecutor getThreadPoolExecutor(int poolSize, int[] poolInfo)

Here you can find the source of getThreadPoolExecutor(int poolSize, int[] poolInfo)

Description

get Thread Pool Executor

License

Open Source License

Declaration

public static ThreadPoolExecutor getThreadPoolExecutor(int poolSize,
            int[] poolInfo) 

Method Source Code

//package com.java2s;
//  are made available under the terms of the Eclipse Public License v1.0

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class Main {
    public static ThreadPoolExecutor getThreadPoolExecutor(int poolSize,
            int[] poolInfo) {
        return new ThreadPoolExecutor(poolSize, poolInfo[0], poolInfo[1],
                TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(
                        poolInfo[2]));/*from w  w w. ja v a 2  s  .com*/
    }
}

Related

  1. executeInBackground(Runnable r)
  2. executeInDaemon(Runnable... run)
  3. getBlockingWorkExecutor()
  4. getBoundedThreadPoolExecutor(int maxPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory tFactory)
  5. getScheduler()
  6. getThreadPoolTrace(ThreadPoolExecutor threadpool)
  7. getWorkerCount(ThreadPoolExecutor workerExecutor)
  8. parseRejectionPolicy(String rejection_policy)