public class TrackingExecutorService extends Object implements ExecutorService
The future purpose of this class is to track which addOn started which task, which makes it possible to hotswap AddOns.
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
method not implemented, will do nothing
|
static TrackingExecutorService |
createTrackingExecutorService(ExecutorService executorService,
Identifiable identifiable)
creates a new ExecutorService
|
void |
execute(Runnable command) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
boolean |
isShutdown()
method not implemented, will always return false
|
boolean |
isTerminated()
method not implemented, will always return false
|
void |
shutdown()
method not implemented
|
List<Runnable> |
shutdownNow()
method not fully implemented.
|
<T> Future<T> |
submit(Callable<T> task)
submits a Task to the ThreadPool
|
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
public static TrackingExecutorService createTrackingExecutorService(ExecutorService executorService, Identifiable identifiable) throws IllegalIDException
executorService
- the ExecutorService to use under the hoodidentifiable
- the identifiable to associate each submitted thread withIllegalIDException
- not yet implementedpublic void shutdown()
shutdown
in interface ExecutorService
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
public boolean isShutdown()
isShutdown
in interface ExecutorService
public boolean isTerminated()
isTerminated
in interface ExecutorService
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
InterruptedException
public <T> Future<T> submit(Callable<T> task)
submit
in interface ExecutorService
T
- the type of the returntask
- the Task to submitpublic <T> Future<T> submit(Runnable task, T result)
submit
in interface ExecutorService
public Future<?> submit(Runnable task)
submit
in interface ExecutorService
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
TimeoutException
Copyright © 2016. All rights reserved.