接口 ExecutorRepository
-
- 所有已知实现类:
DefaultExecutorRepository
@SPI("default") public interface ExecutorRepository
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ExecutorServicecreateExecutorIfAbsent(URL url)Called by both Client and Server.voiddestroyAll()Destroy all executors that are not in shutdown stateExecutorServicegetExecutor(URL url)ScheduledExecutorServicegetExportReferExecutor()ScheduledExecutorServicegetMetadataRetryExecutor()ExecutorServicegetPoolRouterExecutor()ScheduledExecutorServicegetRegistryNotificationExecutor()Scheduled executor handle registry notification.ScheduledExecutorServicegetServiceDiscoveryAddressNotificationExecutor()ExecutorServicegetSharedExecutor()Get the default shared threadpool.ExecutorServicenextExecutorExecutor()ScheduledExecutorServicenextScheduledExecutor()Returns a scheduler from the scheduler list, call this method whenever you need a scheduler for a cron job.voidshutdownExportReferExecutor()The executor only used in bootstrap currently, we should call this method to release the resource after the async export-refer is done.voidupdateThreadpool(URL url, ExecutorService executor)Modify some of the threadpool's properties according to the url, for example, coreSize, maxSize, ...
-
-
-
方法详细资料
-
createExecutorIfAbsent
ExecutorService createExecutorIfAbsent(URL url)
Called by both Client and Server. TODO, consider separate these two parts. When the Client or Server starts for the first time, generate a new threadpool according to the parameters specified.- 参数:
url-- 返回:
-
getExecutor
ExecutorService getExecutor(URL url)
-
updateThreadpool
void updateThreadpool(URL url, ExecutorService executor)
Modify some of the threadpool's properties according to the url, for example, coreSize, maxSize, ...- 参数:
url-executor-
-
nextScheduledExecutor
ScheduledExecutorService nextScheduledExecutor()
Returns a scheduler from the scheduler list, call this method whenever you need a scheduler for a cron job. If your cron cannot burden the possible schedule delay caused by sharing the same scheduler, please consider define a dedicate one.- 返回:
-
nextExecutorExecutor
ExecutorService nextExecutorExecutor()
-
getExportReferExecutor
ScheduledExecutorService getExportReferExecutor()
-
shutdownExportReferExecutor
void shutdownExportReferExecutor()
The executor only used in bootstrap currently, we should call this method to release the resource after the async export-refer is done.
-
getServiceDiscoveryAddressNotificationExecutor
ScheduledExecutorService getServiceDiscoveryAddressNotificationExecutor()
-
getMetadataRetryExecutor
ScheduledExecutorService getMetadataRetryExecutor()
-
getRegistryNotificationExecutor
ScheduledExecutorService getRegistryNotificationExecutor()
Scheduled executor handle registry notification.- 返回:
-
getSharedExecutor
ExecutorService getSharedExecutor()
Get the default shared threadpool.- 返回:
-
getPoolRouterExecutor
ExecutorService getPoolRouterExecutor()
-
destroyAll
void destroyAll()
Destroy all executors that are not in shutdown state
-
-