Search in sources :

Example 1 with ExtendableThreadPoolExecutor

use of com.vip.saturn.job.threads.ExtendableThreadPoolExecutor in project Saturn by vipshop.

the class JobScheduler method initExecutorService.

private void initExecutorService() {
    ThreadFactory factory = new SaturnThreadFactory(jobName);
    executorService = new ExtendableThreadPoolExecutor(0, 100, 2, TimeUnit.MINUTES, new TaskQueue(), factory);
}
Also used : ThreadFactory(java.util.concurrent.ThreadFactory) SaturnThreadFactory(com.vip.saturn.job.threads.SaturnThreadFactory) ExtendableThreadPoolExecutor(com.vip.saturn.job.threads.ExtendableThreadPoolExecutor) TaskQueue(com.vip.saturn.job.threads.TaskQueue) SaturnThreadFactory(com.vip.saturn.job.threads.SaturnThreadFactory)

Aggregations

ExtendableThreadPoolExecutor (com.vip.saturn.job.threads.ExtendableThreadPoolExecutor)1 SaturnThreadFactory (com.vip.saturn.job.threads.SaturnThreadFactory)1 TaskQueue (com.vip.saturn.job.threads.TaskQueue)1 ThreadFactory (java.util.concurrent.ThreadFactory)1