public class DefaultExecutorRepository extends Object implements ExecutorRepository, ExtensionAccessorAware
Lifecycle to enable executors shutdown when the process stops.| Constructor and Description |
|---|
DefaultExecutorRepository(ApplicationModel applicationModel) |
| Modifier and Type | Method and Description |
|---|---|
ExecutorService |
createExecutorIfAbsent(URL url)
Get called when the server or client instance initiating.
|
void |
destroyAll()
Destroy all executors that are not in shutdown state
|
ScheduledExecutorService |
getCacheRefreshingScheduledExecutor()
Scheduler used to refresh file based caches from memory to disk.
|
ScheduledExecutorService |
getConnectivityScheduledExecutor()
Scheduled executor handle connectivity check task
|
ExecutorService |
getExecutor(ServiceModel serviceModel,
URL url) |
ExecutorService |
getExecutor(URL url)
Be careful,The semantics of this method are getOrDefaultExecutor
|
ExecutorSupport |
getExecutorSupport(URL url) |
ExecutorService |
getMappingRefreshingExecutor()
Executor used to run async mapping tasks
|
ScheduledExecutorService |
getMetadataRetryExecutor() |
ExecutorService |
getPoolRouterExecutor() |
ScheduledExecutorService |
getRegistryNotificationExecutor()
Scheduled executor handle registry notification.
|
ScheduledExecutorService |
getServiceDiscoveryAddressNotificationExecutor() |
ScheduledExecutorService |
getServiceExportExecutor() |
ExecutorService |
getServiceReferExecutor() |
ExecutorService |
getSharedExecutor()
Get the default shared threadpool.
|
ScheduledExecutorService |
getSharedScheduledExecutor()
Get the shared schedule executor
|
ExecutorService |
nextExecutorExecutor() |
ScheduledExecutorService |
nextScheduledExecutor()
Returns a scheduler from the scheduler list, call this method whenever you need a scheduler for a cron job.
|
void |
setExtensionAccessor(ExtensionAccessor extensionAccessor) |
void |
shutdownServiceExportExecutor()
The executor only used in bootstrap currently, we should call this method to release the resource
after the async export is done.
|
void |
shutdownServiceReferExecutor()
The executor only used in bootstrap currently, we should call this method to release the resource
after the async refer is done.
|
void |
updateThreadpool(URL url,
ExecutorService executor)
Modify some of the threadpool's properties according to the url, for example, coreSize, maxSize, ...
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInstance, getModepublic DefaultExecutorRepository(ApplicationModel applicationModel)
public ExecutorService createExecutorIfAbsent(URL url)
createExecutorIfAbsent in interface ExecutorRepositoryurl - public ExecutorService getExecutor(URL url)
ExecutorRepositorygetExecutor in interface ExecutorRepositorypublic ExecutorService getExecutor(ServiceModel serviceModel, URL url)
getExecutor in interface ExecutorRepositorypublic void updateThreadpool(URL url, ExecutorService executor)
ExecutorRepositoryupdateThreadpool in interface ExecutorRepositorypublic ScheduledExecutorService getServiceExportExecutor()
getServiceExportExecutor in interface ExecutorRepositorypublic void shutdownServiceExportExecutor()
ExecutorRepositoryshutdownServiceExportExecutor in interface ExecutorRepositorypublic ExecutorService getServiceReferExecutor()
getServiceReferExecutor in interface ExecutorRepositorypublic void shutdownServiceReferExecutor()
ExecutorRepositoryshutdownServiceReferExecutor in interface ExecutorRepositorypublic void destroyAll()
ExecutorRepositorydestroyAll in interface ExecutorRepositorypublic void setExtensionAccessor(ExtensionAccessor extensionAccessor)
setExtensionAccessor in interface ExtensionAccessorAwarepublic ScheduledExecutorService nextScheduledExecutor()
ExecutorRepositorynextScheduledExecutor in interface ExecutorRepositorypublic ExecutorService nextExecutorExecutor()
nextExecutorExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getServiceDiscoveryAddressNotificationExecutor()
getServiceDiscoveryAddressNotificationExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getMetadataRetryExecutor()
getMetadataRetryExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getRegistryNotificationExecutor()
ExecutorRepositorygetRegistryNotificationExecutor in interface ExecutorRepositorypublic ExecutorService getSharedExecutor()
ExecutorRepositorygetSharedExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getSharedScheduledExecutor()
ExecutorRepositorygetSharedScheduledExecutor in interface ExecutorRepositorypublic ExecutorService getPoolRouterExecutor()
getPoolRouterExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getConnectivityScheduledExecutor()
ExecutorRepositorygetConnectivityScheduledExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getCacheRefreshingScheduledExecutor()
ExecutorRepositorygetCacheRefreshingScheduledExecutor in interface ExecutorRepositorypublic ExecutorService getMappingRefreshingExecutor()
ExecutorRepositorygetMappingRefreshingExecutor in interface ExecutorRepositorypublic ExecutorSupport getExecutorSupport(URL url)
getExecutorSupport in interface ExecutorRepositoryCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.