public class SendExecutorServices extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static ExecutorService |
getSendExecutorServices()
获取 ExecutorService 对象
|
static ExecutorService |
getSendExecutorServices(int nThreads)
获取 ExecutorService 对象
|
static void |
isExecutorServiceNotNull()
executorService 是否已实例化
|
static void |
shutdown(Boolean isForce)
关闭线程池
|
public static ExecutorService getSendExecutorServices()
public static ExecutorService getSendExecutorServices(int nThreads)
nThreads - the number of threads in the poolpublic static void shutdown(Boolean isForce)
isForce - 是否立即关闭,是:则丢弃队列中的线程,发送interrupt()给正在执行的线程
否:则停止接收新线程入队,等待正在执行的线程完成public static void isExecutorServiceNotNull()
Copyright © 2020. All rights reserved.