public abstract class InterceptingExecutorService
extends com.google.common.util.concurrent.ForwardingExecutorService
ExecutorService
that wraps all the tasks that run inside.Constructor and Description |
---|
InterceptingExecutorService(ExecutorService base) |
Modifier and Type | Method and Description |
---|---|
protected ExecutorService |
delegate() |
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) |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
protected abstract <V> Callable<V> |
wrap(Callable<V> r) |
protected abstract Runnable |
wrap(Runnable r) |
public InterceptingExecutorService(ExecutorService base)
protected ExecutorService delegate()
delegate
in class com.google.common.util.concurrent.ForwardingExecutorService
public <T> Future<T> submit(Callable<T> task)
submit
in interface ExecutorService
submit
in class com.google.common.util.concurrent.ForwardingExecutorService
public <T> Future<T> submit(Runnable task, T result)
submit
in interface ExecutorService
submit
in class com.google.common.util.concurrent.ForwardingExecutorService
public Future<?> submit(Runnable task)
submit
in interface ExecutorService
submit
in class com.google.common.util.concurrent.ForwardingExecutorService
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll
in interface ExecutorService
invokeAll
in class com.google.common.util.concurrent.ForwardingExecutorService
InterruptedException
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll
in interface ExecutorService
invokeAll
in class com.google.common.util.concurrent.ForwardingExecutorService
InterruptedException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny
in interface ExecutorService
invokeAny
in class com.google.common.util.concurrent.ForwardingExecutorService
InterruptedException
ExecutionException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny
in interface ExecutorService
invokeAny
in class com.google.common.util.concurrent.ForwardingExecutorService
InterruptedException
ExecutionException
TimeoutException
Copyright © 2004–2021. All rights reserved.