public class DefaultExecutorRepository extends Object implements ExecutorRepository
Licycle to enable executors shutdown when the process stops.| 构造器和说明 |
|---|
DefaultExecutorRepository() |
| 限定符和类型 | 方法和说明 |
|---|---|
ExecutorService |
createExecutorIfAbsent(URL url)
Get called when the server or client instance initiating.
|
void |
destroyAll()
Destroy all executors that are not in shutdown state
|
ExecutorService |
getExecutor(URL url) |
ScheduledExecutorService |
getServiceExporterExecutor() |
ExecutorService |
getSharedExecutor()
Get the default shared threadpool.
|
ScheduledExecutorService |
nextScheduledExecutor()
Returns a scheduler from the scheduler list, call this method whenever you need a scheduler for a cron job.
|
void |
updateThreadpool(URL url,
ExecutorService executor)
Modify some of the threadpool's properties according to the url, for example, coreSize, maxSize, ...
|
public ExecutorService createExecutorIfAbsent(URL url)
createExecutorIfAbsent 在接口中 ExecutorRepositoryurl - public ExecutorService getExecutor(URL url)
getExecutor 在接口中 ExecutorRepositorypublic void updateThreadpool(URL url, ExecutorService executor)
ExecutorRepositoryupdateThreadpool 在接口中 ExecutorRepositorypublic ScheduledExecutorService nextScheduledExecutor()
ExecutorRepositorynextScheduledExecutor 在接口中 ExecutorRepositorypublic ScheduledExecutorService getServiceExporterExecutor()
getServiceExporterExecutor 在接口中 ExecutorRepositorypublic ExecutorService getSharedExecutor()
ExecutorRepositorygetSharedExecutor 在接口中 ExecutorRepositorypublic void destroyAll()
ExecutorRepositorydestroyAll 在接口中 ExecutorRepositoryCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.