public class InstrumentedExecutorService extends Object implements ExecutorService
| Constructor and Description |
|---|
InstrumentedExecutorService(ExecutorService delegate,
MetricCollector metricCollector,
String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long l,
TimeUnit timeUnit) |
void |
execute(Runnable runnable) |
<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() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable runnable) |
<T> Future<T> |
submit(Runnable runnable,
T result) |
public InstrumentedExecutorService(ExecutorService delegate, MetricCollector metricCollector, String name)
public Future<?> submit(Runnable runnable)
submit in interface ExecutorServicepublic <T> Future<T> submit(Runnable runnable, T result)
submit in interface ExecutorServicepublic <T> Future<T> submit(Callable<T> task)
submit in interface ExecutorServicepublic <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedExceptionpublic <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedExceptionpublic <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws ExecutionException, InterruptedException
invokeAny in interface ExecutorServiceExecutionExceptionInterruptedExceptionpublic <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws ExecutionException, InterruptedException, TimeoutException
invokeAny in interface ExecutorServiceExecutionExceptionInterruptedExceptionTimeoutExceptionpublic 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 l,
TimeUnit timeUnit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedExceptionCopyright © 2016–2018. All rights reserved.