public final class BoundedExecutorServiceWrapper extends Object implements ExecutorServiceWrapper
Construct using a BoundedExecutorServiceWrapper.Builder.
Modifier and Type | Class and Description |
---|---|
static class |
BoundedExecutorServiceWrapper.Builder |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination()
Shutdown thread pool and block until it is drained using the configured timeout.
|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
Shutdown thread pool and block until it is drained.
|
boolean |
isTerminated() |
<O> io.atlassian.util.concurrent.Promise<O> |
submit(Callable<O> job) |
public <O> io.atlassian.util.concurrent.Promise<O> submit(Callable<O> job)
submit
in interface ExecutorServiceWrapper
public boolean awaitTermination()
awaitTermination
in interface ExecutorServiceWrapper
public boolean awaitTermination(long timeout, TimeUnit unit)
awaitTermination
in interface ExecutorServiceWrapper
timeout
- the shutdown timeoutunit
- the shutdown timeout unitpublic boolean isTerminated()
isTerminated
in interface ExecutorServiceWrapper
Copyright © 2002-2021 Atlassian. All Rights Reserved.