@SPI(value="default") public interface ExecutorRepository
| Modifier and Type | Method and Description |
|---|---|
ExecutorService |
createExecutorIfAbsent(URL url)
Called by both Client and Server.
|
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, ...
|
ExecutorService createExecutorIfAbsent(URL url)
url - ExecutorService getExecutor(URL url)
void updateThreadpool(URL url, ExecutorService executor)
url - executor - ScheduledExecutorService nextScheduledExecutor()
ScheduledExecutorService getServiceExporterExecutor()
ExecutorService getSharedExecutor()
void destroyAll()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.