package com.ynxbd.push.thread; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; /** * @author ζŽθΏ›ζ‰ */ public class ThreadConfig { private ThreadConfig(){} public static final Integer MAX_QUEUE_COUNT = 10000; public static ThreadPoolExecutor getExecutor(int corePoolSize,int maximumPoolSize) { LinkedBlockingQueue workQueue = new LinkedBlockingQueue<>(MAX_QUEUE_COUNT); return new ThreadPoolExecutor(corePoolSize, maximumPoolSize, 1000, TimeUnit.MINUTES, workQueue); } }