public class DefaultThreadPoolService extends Object implements ThreadPoolService
ThreadPoolService.Names, ThreadPoolService.Run<T>| Constructor and Description |
|---|
DefaultThreadPoolService(Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
Executor |
build(String name) |
Executor |
buildCache(String name) |
Executor |
executor(String name) |
<T> T |
runWithTimeout(int timeValue,
ThreadPoolService.Run<T> run) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
TimeValue interval) |
void |
shutdown() |
void |
shutdownNow() |
DefaultThreadPoolService |
start() |
@Inject public DefaultThreadPoolService(Settings settings)
public <T> T runWithTimeout(int timeValue,
ThreadPoolService.Run<T> run)
runWithTimeout in interface ThreadPoolServicepublic DefaultThreadPoolService start()
public Executor executor(String name)
executor in interface ThreadPoolServicepublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, TimeValue interval)
public void shutdown()
shutdown in interface ThreadPoolServicepublic void shutdownNow()
shutdownNow in interface ThreadPoolServicepublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionCopyright © 2020. All rights reserved.