public class ContextPropagatingExecutorService extends WrappingExecutorService
| Constructor and Description |
|---|
ContextPropagatingExecutorService(ExecutorService delegate,
Iterable<ContextPropagator<?>> propagators)
Constructs a new context propagating executor service.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> Callable<T> |
wrap(Callable<T> c)
Wraps the given task.
|
protected <T,C extends Callable<T>> |
wrap(Collection<C> coll)
Wraps the given collection of tasks by calling
WrappingExecutorService.wrap(Callable) for each element in the
given collection. |
protected Runnable |
wrap(Runnable r)
Wraps the given task by first adapting it to a
Callable
and then wrapping via WrappingExecutorService.wrap(Callable). |
awaitTermination, delegate, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitexecuteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmakeFluent, makeFluent, makeFluentScheduled, makeFluentScheduled, sameThreadExecutorServicepublic ContextPropagatingExecutorService(ExecutorService delegate, Iterable<ContextPropagator<?>> propagators)
delegate - the underlying executor service, for executing taskspropagators - objects that manage and propagate context for each task submissionprotected final <T> Callable<T> wrap(Callable<T> c)
WrappingExecutorServicewrap in class WrappingExecutorServicec - a taskprotected final Runnable wrap(Runnable r)
WrappingExecutorServiceCallable
and then wrapping via WrappingExecutorService.wrap(Callable).wrap in class WrappingExecutorServicer - a taskprotected final <T,C extends Callable<T>> Collection<Callable<T>> wrap(Collection<C> coll)
WrappingExecutorServiceWrappingExecutorService.wrap(Callable) for each element in the
given collection.wrap in class WrappingExecutorServicecoll - a collection of tasks