public class LocalTrackingExecutorService extends AbstractExecutorService implements TrackingExecutorService
| Constructor and Description |
|---|
LocalTrackingExecutorService(ExecutorService master,
boolean oneOff,
String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
execute(Runnable command) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
join()
Executes and removes pending tasks, exits when all tasks are completed.
|
boolean |
join(long timeout)
Waits for the processor to finish work for specified time.
|
protected <T> RunnableFuture<T> |
newTaskFor(Callable<T> callable) |
protected <T> RunnableFuture<T> |
newTaskFor(Runnable runnable,
T value) |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submitpublic LocalTrackingExecutorService(ExecutorService master, boolean oneOff, String name)
master - Master executor.oneOff - If true, join can be invoked only once. No tasks can be submitted to the executor once
join() returns.public void shutdown()
shutdown in interface ExecutorServicepublic List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServicepublic boolean isShutdown()
isShutdown in interface ExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServicepublic boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedExceptionprotected <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
newTaskFor in class AbstractExecutorServiceprotected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
newTaskFor in class AbstractExecutorServicepublic void join() throws InterruptedException
join in interface AsynchronousProcessorInterruptedExceptionpublic boolean join(long timeout) throws InterruptedException
AsynchronousProcessorjoin in interface AsynchronousProcessorInterruptedException