public class GlobalThreadPoolManage extends Object
| 构造器和说明 |
|---|
GlobalThreadPoolManage() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ThreadPoolExecutor |
dynamicRegister(DynamicThreadPoolRegisterWrapper registerWrapper)
Dynamically register thread pool records and notification records.
|
static ThreadPoolExecutor |
getExecutor(String threadPoolId)
Get the dynamic thread pool wrapper class.
|
static DynamicThreadPoolWrapper |
getExecutorService(String threadPoolId)
Get the dynamic thread pool wrapper class.
|
static ThreadPoolParameter |
getPoolParameter(String threadPoolId)
Get dynamic thread pool parameters.
|
static Integer |
getThreadPoolNum()
Get the number of dynamic thread pools.
|
static List<String> |
listThreadPoolId()
Get the dynamic thread pool identifier collection.
|
static void |
register(String threadPoolId,
ThreadPoolParameter threadPoolParameter,
DynamicThreadPoolWrapper executor)
Register dynamic thread pool wrapper and parameters.
|
static void |
registerPool(String threadPoolId,
DynamicThreadPoolWrapper executor)
Register dynamic thread pool.
|
static void |
registerPoolParameter(String threadPoolId,
ThreadPoolParameter threadPoolParameter)
Register dynamic thread pool parameters.
|
public static DynamicThreadPoolWrapper getExecutorService(String threadPoolId)
threadPoolId - thread-pool idpublic static ThreadPoolExecutor getExecutor(String threadPoolId)
threadPoolId - thread-pool idpublic static ThreadPoolParameter getPoolParameter(String threadPoolId)
threadPoolId - thread-pool idpublic static void register(String threadPoolId, ThreadPoolParameter threadPoolParameter, DynamicThreadPoolWrapper executor)
threadPoolId - thread-pool idthreadPoolParameter - thread-pool parameterexecutor - executorpublic static void registerPool(String threadPoolId, DynamicThreadPoolWrapper executor)
threadPoolId - thread-pool idexecutor - executorpublic static void registerPoolParameter(String threadPoolId, ThreadPoolParameter threadPoolParameter)
threadPoolId - thread-pool idthreadPoolParameter - thread-pool parameterpublic static ThreadPoolExecutor dynamicRegister(DynamicThreadPoolRegisterWrapper registerWrapper)
registerWrapper - register wrapperpublic static List<String> listThreadPoolId()
public static Integer getThreadPoolNum()
The data may be inaccurate when the project is initially launched because registration is done asynchronously.
Copyright © 2022. All rights reserved.