public final class Context extends Object
| Constructor and Description |
|---|
Context() |
| Modifier and Type | Method and Description |
|---|---|
static Executor |
decorate(Executor executor)
Returns an Executor that wraps Runnables before submission to the passed in Executor.
|
static ExecutorService |
decorate(ExecutorService executorService)
Returns an ExecutorService that wraps *ables before submission to the passed in
ExecutorService.
|
static com.google.common.util.concurrent.ListeningExecutorService |
decorate(com.google.common.util.concurrent.ListeningExecutorService service)
Returns a ListeningExecutorService that wraps *ables before submission to the passed in
ListeningExecutorService.
|
static com.google.common.util.concurrent.ListeningScheduledExecutorService |
decorate(com.google.common.util.concurrent.ListeningScheduledExecutorService service)
Returns a ListeningScheduledExecutorService that wraps *ables before submission to the passed
in ListeningScheduledExecutorService.
|
static ScheduledExecutorService |
decorate(ScheduledExecutorService service)
Returns a ScheduledExecutorService that wraps *ables before submission to the passed in
ScheduledExecutorService.
|
static <T> Callable<T> |
makeContextCallable(Callable<T> in)
Returns a Callable that will retain the stack trace information about where it
originated from.
|
static Runnable |
makeContextRunnable(Runnable in)
Returns a Runnable that will retain the stack trace information about where it
originated from.
|
public static <T> Callable<T> makeContextCallable(Callable<T> in)
T - The result type.in - The original Callable.public static Runnable makeContextRunnable(Runnable in)
in - The original Runnablepublic static Executor decorate(Executor executor)
executor - The executor to decorate.public static ExecutorService decorate(ExecutorService executorService)
executorService - The ExecutorService to decorate.public static ScheduledExecutorService decorate(ScheduledExecutorService service)
service - The ScheduledExecutorService to decorate.public static com.google.common.util.concurrent.ListeningExecutorService decorate(com.google.common.util.concurrent.ListeningExecutorService service)
service - The ListeningExecutorService to decorate.public static com.google.common.util.concurrent.ListeningScheduledExecutorService decorate(com.google.common.util.concurrent.ListeningScheduledExecutorService service)
service - The ListeningScheduledExecutorService to decorate.Copyright © 2015. All rights reserved.