public class DefaultExecutorRepository extends Object implements ExecutorRepository, ExtensionAccessorAware, ScopeModelAware
Licycle to enable executors shutdown when the process stops.| Modifier and Type | Field and Description |
|---|---|
Ring<ScheduledExecutorService> |
registryNotificationExecutorRing |
| Constructor and Description |
|---|
DefaultExecutorRepository() |
| 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 |
getConnectivityScheduledExecutor()
Scheduled executor handle connectivity check task
|
ExecutorService |
getExecutor(URL url) |
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 |
setApplicationModel(ApplicationModel applicationModel)
Override this method if you just need application model
|
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, waitsetFrameworkModel, setModuleModel, setScopeModelpublic Ring<ScheduledExecutorService> registryNotificationExecutorRing
public ExecutorService createExecutorIfAbsent(URL url)
createExecutorIfAbsent in interface ExecutorRepositoryurl - public ExecutorService getExecutor(URL url)
getExecutor in interface ExecutorRepositorypublic void updateThreadpool(URL url, ExecutorService executor)
ExecutorRepositoryupdateThreadpool in interface ExecutorRepositorypublic ScheduledExecutorService nextScheduledExecutor()
ExecutorRepositorynextScheduledExecutor in interface ExecutorRepositorypublic ExecutorService nextExecutorExecutor()
nextExecutorExecutor 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 ScheduledExecutorService getRegistryNotificationExecutor()
ExecutorRepositorygetRegistryNotificationExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getServiceDiscoveryAddressNotificationExecutor()
getServiceDiscoveryAddressNotificationExecutor in interface ExecutorRepositorypublic ScheduledExecutorService getMetadataRetryExecutor()
getMetadataRetryExecutor 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 void destroyAll()
ExecutorRepositorydestroyAll in interface ExecutorRepositorypublic void setExtensionAccessor(ExtensionAccessor extensionAccessor)
setExtensionAccessor in interface ExtensionAccessorAwarepublic void setApplicationModel(ApplicationModel applicationModel)
ScopeModelAwaresetApplicationModel in interface ScopeModelAwareCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.