public static final class ExecutorFactory.Managed extends Object
| 构造器和说明 |
|---|
Managed() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ThreadPoolExecutor |
newCustomerThreadExecutor(String group,
int coreThreads,
int maxThreads,
long keepAliveTimeMs,
ThreadFactory threadFactory)
Create a new custom executor service and register to manager.
|
static ExecutorService |
newFixedExecutorService(String group,
int nThreads)
Create a new fixed executor service with default thread factory and register to manager.
|
static ExecutorService |
newFixedExecutorService(String group,
int nThreads,
ThreadFactory threadFactory)
Create a new fixed executor service with input thread factory and register to manager.
|
static ScheduledExecutorService |
newScheduledExecutorService(String group,
int nThreads,
ThreadFactory threadFactory)
Create a new scheduled executor service with input thread factory and register to manager.
|
static ExecutorService |
newSingleExecutorService(String group)
Create a new single executor service with default thread factory and register to manager.
|
static ExecutorService |
newSingleExecutorService(String group,
ThreadFactory threadFactory)
Create a new single executor service with input thread factory and register to manager.
|
static ScheduledExecutorService |
newSingleScheduledExecutorService(String group,
ThreadFactory threadFactory)
Create a new single scheduled executor service with input thread factory and register to manager.
|
public static ExecutorService newSingleExecutorService(String group)
group - group namepublic static ExecutorService newSingleExecutorService(String group, ThreadFactory threadFactory)
group - group namethreadFactory - thread factorypublic static ExecutorService newFixedExecutorService(String group, int nThreads)
group - group namenThreads - thread numberpublic static ExecutorService newFixedExecutorService(String group, int nThreads, ThreadFactory threadFactory)
group - group namenThreads - thread numberthreadFactory - thread factorypublic static ScheduledExecutorService newSingleScheduledExecutorService(String group, ThreadFactory threadFactory)
group - group namethreadFactory - thread factorypublic static ScheduledExecutorService newScheduledExecutorService(String group, int nThreads, ThreadFactory threadFactory)
group - group namenThreads - thread numberthreadFactory - thread factorypublic static ThreadPoolExecutor newCustomerThreadExecutor(String group, int coreThreads, int maxThreads, long keepAliveTimeMs, ThreadFactory threadFactory)
group - group namecoreThreads - core thread numbermaxThreads - max thread numberkeepAliveTimeMs - keep alive time millisecondsthreadFactory - thread facotryCopyright © 2018–2022 Alibaba Group. All rights reserved.