类 ExecutorFactory.Managed
- java.lang.Object
-
- com.alibaba.nacos.common.executor.ExecutorFactory.Managed
-
- 封闭类:
- ExecutorFactory
public static final class ExecutorFactory.Managed extends java.lang.Object
-
-
字段概要
字段 修饰符和类型 字段 说明 private static java.lang.StringDEFAULT_NAMESPACEprivate static ThreadPoolManagerTHREAD_POOL_MANAGER
-
构造器概要
构造器 构造器 说明 Managed()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static ThreadPoolManagergetThreadPoolManager()static java.util.concurrent.ThreadPoolExecutornewCustomerThreadExecutor(java.lang.String group, int coreThreads, int maxThreads, long keepAliveTimeMs, java.util.concurrent.ThreadFactory threadFactory)Create a new custom executor service and register to manager.static java.util.concurrent.ExecutorServicenewFixedExecutorService(java.lang.String group, int nThreads)Create a new fixed executor service with default thread factory and register to manager.static java.util.concurrent.ExecutorServicenewFixedExecutorService(java.lang.String group, int nThreads, java.util.concurrent.ThreadFactory threadFactory)Create a new fixed executor service with input thread factory and register to manager.static java.util.concurrent.ScheduledExecutorServicenewScheduledExecutorService(java.lang.String group, int nThreads, java.util.concurrent.ThreadFactory threadFactory)Create a new scheduled executor service with input thread factory and register to manager.static java.util.concurrent.ExecutorServicenewSingleExecutorService(java.lang.String group)Create a new single executor service with default thread factory and register to manager.static java.util.concurrent.ExecutorServicenewSingleExecutorService(java.lang.String group, java.util.concurrent.ThreadFactory threadFactory)Create a new single executor service with input thread factory and register to manager.static java.util.concurrent.ScheduledExecutorServicenewSingleScheduledExecutorService(java.lang.String group, java.util.concurrent.ThreadFactory threadFactory)Create a new single scheduled executor service with input thread factory and register to manager.
-
-
-
字段详细资料
-
DEFAULT_NAMESPACE
private static final java.lang.String DEFAULT_NAMESPACE
- 另请参阅:
- 常量字段值
-
THREAD_POOL_MANAGER
private static final ThreadPoolManager THREAD_POOL_MANAGER
-
-
方法详细资料
-
newSingleExecutorService
public static java.util.concurrent.ExecutorService newSingleExecutorService(java.lang.String group)
Create a new single executor service with default thread factory and register to manager.- 参数:
group- group name- 返回:
- new single executor service
-
newSingleExecutorService
public static java.util.concurrent.ExecutorService newSingleExecutorService(java.lang.String group, java.util.concurrent.ThreadFactory threadFactory)Create a new single executor service with input thread factory and register to manager.- 参数:
group- group namethreadFactory- thread factory- 返回:
- new single executor service
-
newFixedExecutorService
public static java.util.concurrent.ExecutorService newFixedExecutorService(java.lang.String group, int nThreads)Create a new fixed executor service with default thread factory and register to manager.- 参数:
group- group namenThreads- thread number- 返回:
- new fixed executor service
-
newFixedExecutorService
public static java.util.concurrent.ExecutorService newFixedExecutorService(java.lang.String group, int nThreads, java.util.concurrent.ThreadFactory threadFactory)Create a new fixed executor service with input thread factory and register to manager.- 参数:
group- group namenThreads- thread numberthreadFactory- thread factory- 返回:
- new fixed executor service
-
newSingleScheduledExecutorService
public static java.util.concurrent.ScheduledExecutorService newSingleScheduledExecutorService(java.lang.String group, java.util.concurrent.ThreadFactory threadFactory)Create a new single scheduled executor service with input thread factory and register to manager.- 参数:
group- group namethreadFactory- thread factory- 返回:
- new single scheduled executor service
-
newScheduledExecutorService
public static java.util.concurrent.ScheduledExecutorService newScheduledExecutorService(java.lang.String group, int nThreads, java.util.concurrent.ThreadFactory threadFactory)Create a new scheduled executor service with input thread factory and register to manager.- 参数:
group- group namenThreads- thread numberthreadFactory- thread factory- 返回:
- new scheduled executor service
-
newCustomerThreadExecutor
public static java.util.concurrent.ThreadPoolExecutor newCustomerThreadExecutor(java.lang.String group, int coreThreads, int maxThreads, long keepAliveTimeMs, java.util.concurrent.ThreadFactory threadFactory)Create a new custom executor service and register to manager.- 参数:
group- group namecoreThreads- core thread numbermaxThreads- max thread numberkeepAliveTimeMs- keep alive time millisecondsthreadFactory- thread factory- 返回:
- new custom executor service
-
getThreadPoolManager
public static ThreadPoolManager getThreadPoolManager()
-
-