Here you can find the source of createExecutor()
public static ThreadPoolExecutor createExecutor()
//package com.java2s; //License from project: Open Source License import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class Main { public static ThreadPoolExecutor createExecutor() { return createExecutor(8, 32); }/* w w w .ja v a 2 s .c o m*/ private static ThreadPoolExecutor createExecutor(int corePoolSize, int maxPoolSize) { return new ThreadPoolExecutor(corePoolSize, maxPoolSize, 10, TimeUnit.SECONDS, new ArrayBlockingQueue<>(256)); } }