Class DefaultExecutorRepository
java.lang.Object
org.apache.dubbo.common.threadpool.manager.DefaultExecutorRepository
- All Implemented Interfaces:
ExtensionAccessorAware,ExecutorRepository
- Direct Known Subclasses:
IsolationExecutorRepository
public class DefaultExecutorRepository
extends Object
implements ExecutorRepository, ExtensionAccessorAware
Consider implementing
Lifecycle to enable executors shutdown when the process stops.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet called when the server or client instance initiating.voidDestroy all executors that are not in shutdown stateScheduler used to refresh file based caches from memory to disk.Scheduled executor handle connectivity check taskgetExecutor(URL url) Be careful,The semantics of this method are getOrDefaultExecutorgetExecutor(ServiceModel serviceModel, URL url) getExecutorSupport(URL url) Executor used to run async mapping tasksScheduled executor handle registry notification.Get the default shared threadpool.Get the shared schedule executorReturns a scheduler from the scheduler list, call this method whenever you need a scheduler for a cron job.voidsetExtensionAccessor(ExtensionAccessor extensionAccessor) voidThe executor only used in bootstrap currently, we should call this method to release the resource after the async export is done.voidThe executor only used in bootstrap currently, we should call this method to release the resource after the async refer is done.voidupdateThreadpool(URL url, ExecutorService executor) Modify some of the threadpool's properties according to the url, for example, coreSize, maxSize, ...
-
Constructor Details
-
DefaultExecutorRepository
-
-
Method Details
-
createExecutorIfAbsent
Get called when the server or client instance initiating.- Specified by:
createExecutorIfAbsentin interfaceExecutorRepository- Parameters:
url-- Returns:
-
getExecutor
Description copied from interface:ExecutorRepositoryBe careful,The semantics of this method are getOrDefaultExecutor- Specified by:
getExecutorin interfaceExecutorRepository- Parameters:
url-- Returns:
-
getExecutor
- Specified by:
getExecutorin interfaceExecutorRepository
-
updateThreadpool
Description copied from interface:ExecutorRepositoryModify some of the threadpool's properties according to the url, for example, coreSize, maxSize, ...- Specified by:
updateThreadpoolin interfaceExecutorRepository- Parameters:
url-executor-
-
getServiceExportExecutor
- Specified by:
getServiceExportExecutorin interfaceExecutorRepository
-
shutdownServiceExportExecutor
public void shutdownServiceExportExecutor()Description copied from interface:ExecutorRepositoryThe executor only used in bootstrap currently, we should call this method to release the resource after the async export is done.- Specified by:
shutdownServiceExportExecutorin interfaceExecutorRepository
-
getServiceReferExecutor
- Specified by:
getServiceReferExecutorin interfaceExecutorRepository
-
shutdownServiceReferExecutor
public void shutdownServiceReferExecutor()Description copied from interface:ExecutorRepositoryThe executor only used in bootstrap currently, we should call this method to release the resource after the async refer is done.- Specified by:
shutdownServiceReferExecutorin interfaceExecutorRepository
-
destroyAll
public void destroyAll()Description copied from interface:ExecutorRepositoryDestroy all executors that are not in shutdown state- Specified by:
destroyAllin interfaceExecutorRepository
-
setExtensionAccessor
- Specified by:
setExtensionAccessorin interfaceExtensionAccessorAware
-
nextScheduledExecutor
Description copied from interface:ExecutorRepositoryReturns 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.- Specified by:
nextScheduledExecutorin interfaceExecutorRepository- Returns:
- ScheduledExecutorService
-
nextExecutorExecutor
- Specified by:
nextExecutorExecutorin interfaceExecutorRepository- Returns:
- ExecutorService
-
getServiceDiscoveryAddressNotificationExecutor
- Specified by:
getServiceDiscoveryAddressNotificationExecutorin interfaceExecutorRepository- Returns:
- ScheduledExecutorService
-
getMetadataRetryExecutor
- Specified by:
getMetadataRetryExecutorin interfaceExecutorRepository- Returns:
- ScheduledExecutorService
-
getRegistryNotificationExecutor
Description copied from interface:ExecutorRepositoryScheduled executor handle registry notification.- Specified by:
getRegistryNotificationExecutorin interfaceExecutorRepository- Returns:
- ScheduledExecutorService
-
getPoolRouterExecutor
- Specified by:
getPoolRouterExecutorin interfaceExecutorRepository- Returns:
- ExecutorService
-
getConnectivityScheduledExecutor
Description copied from interface:ExecutorRepositoryScheduled executor handle connectivity check task- Specified by:
getConnectivityScheduledExecutorin interfaceExecutorRepository- Returns:
- ScheduledExecutorService
-
getCacheRefreshingScheduledExecutor
Description copied from interface:ExecutorRepositoryScheduler used to refresh file based caches from memory to disk.- Specified by:
getCacheRefreshingScheduledExecutorin interfaceExecutorRepository- Returns:
- ScheduledExecutorService
-
getMappingRefreshingExecutor
Description copied from interface:ExecutorRepositoryExecutor used to run async mapping tasks- Specified by:
getMappingRefreshingExecutorin interfaceExecutorRepository- Returns:
- ExecutorService
-
getExecutorSupport
- Specified by:
getExecutorSupportin interfaceExecutorRepository
-