public interface InstrumentedExecutorService extends java.util.concurrent.ExecutorService, InstrumentedExecutor
ExecutorService
that has been instrumented to allow for propagation of thread state
and other instrumentation related tasks.Modifier and Type | Method and Description |
---|---|
default boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
java.util.concurrent.ExecutorService |
getTarget()
Implementors can override to specify the target
ExecutorService . |
default <T> java.util.concurrent.Callable<T> |
instrument(java.util.concurrent.Callable<T> task)
Instruments the given callable task.
|
default <T> java.util.List<java.util.concurrent.Future<T>> |
invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) |
default <T> java.util.List<java.util.concurrent.Future<T>> |
invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks,
long timeout,
java.util.concurrent.TimeUnit unit) |
default <T> T |
invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) |
default <T> T |
invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks,
long timeout,
java.util.concurrent.TimeUnit unit) |
default boolean |
isShutdown() |
default boolean |
isTerminated() |
default void |
shutdown() |
default java.util.List<java.lang.Runnable> |
shutdownNow() |
default <T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> task) |
default java.util.concurrent.Future<?> |
submit(java.lang.Runnable task) |
default <T> java.util.concurrent.Future<T> |
submit(java.lang.Runnable task,
T result) |
execute
instrument
java.util.concurrent.ExecutorService getTarget()
ExecutorService
.getTarget
in interface InstrumentedExecutor
ExecutorService
default <T> java.util.concurrent.Callable<T> instrument(java.util.concurrent.Callable<T> task)
T
- The generic return typetask
- the task to instrumentdefault void shutdown()
shutdown
in interface java.util.concurrent.ExecutorService
default java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
in interface java.util.concurrent.ExecutorService
default boolean isShutdown()
isShutdown
in interface java.util.concurrent.ExecutorService
default boolean isTerminated()
isTerminated
in interface java.util.concurrent.ExecutorService
default boolean awaitTermination(long timeout, @NonNull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
awaitTermination
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
@NonNull default <T> java.util.concurrent.Future<T> submit(@NonNull java.util.concurrent.Callable<T> task)
submit
in interface java.util.concurrent.ExecutorService
@NonNull default <T> java.util.concurrent.Future<T> submit(@NonNull java.lang.Runnable task, T result)
submit
in interface java.util.concurrent.ExecutorService
@NonNull default java.util.concurrent.Future<?> submit(@NonNull java.lang.Runnable task)
submit
in interface java.util.concurrent.ExecutorService
@NonNull default <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(@NonNull java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.InterruptedException
invokeAll
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
@NonNull default <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(@NonNull java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, @NonNull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
invokeAll
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
@NonNull default <T> T invokeAny(@NonNull java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
invokeAny
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
java.util.concurrent.ExecutionException
@NonNull default <T> T invokeAny(@NonNull java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, @NonNull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
invokeAny
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException