public final class JBossExecutors
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.concurrent.RejectedExecutionHandler |
ABORT_POLICY |
private static BlockingExecutor |
BLOCKING_DIRECT_EXECUTOR |
private static BlockingExecutor |
BLOCKING_DISCARDING_EXECUTOR |
private static BlockingExecutor |
BLOCKING_REJECTING_EXECUTOR |
private static java.util.concurrent.RejectedExecutionHandler |
CALLER_RUNS_POLICY |
private static java.lang.RuntimePermission |
COPY_CONTEXT_CLASSLOADER_PERMISSION |
private static DirectExecutorService |
DIRECT_EXECUTOR_SERVICE |
private static java.util.concurrent.RejectedExecutionHandler |
DISCARD_OLDEST_POLICY |
private static java.util.concurrent.RejectedExecutionHandler |
DISCARD_POLICY |
private static DirectExecutorService |
DISCARDING_EXECUTOR_SERVICE |
private static java.lang.Thread.UncaughtExceptionHandler |
LOGGING_HANDLER |
private static java.lang.RuntimePermission |
MODIFY_THREAD_PERMISSION |
private static java.lang.Runnable |
NULL_RUNNABLE |
private static DirectExecutorService |
REJECTING_EXECUTOR_SERVICE |
private static java.lang.Runnable |
TCCL_RESETTER |
private static org.jboss.logging.Logger |
THREAD_ERROR_LOGGER |
private static java.lang.Runnable |
THREAD_LOCAL_RESETTER |
| Modifier | Constructor and Description |
|---|---|
private |
JBossExecutors() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.concurrent.RejectedExecutionHandler |
abortPolicy()
Get the abort policy for a
ThreadPoolExecutor. |
static BlockingExecutor |
blockingDirectExecutor()
Get an executor which executes tasks in the current thread, which implements
BlockingExecutor. |
static BlockingExecutor |
blockingDiscardingExecutor()
Get an executor which discards all tasks, which implements
BlockingExecutor. |
static BlockingExecutor |
blockingRejectingExecutor()
Get an executor which rejects all tasks, which implements
BlockingExecutor. |
static java.util.concurrent.RejectedExecutionHandler |
callerRunsPolicy()
Get the caller-runs policy for a
ThreadPoolExecutor. |
(package private) static void |
checkAccess(java.security.Permission permission) |
static java.lang.Runnable |
classLoaderPreservingTask(java.lang.Runnable delegate)
Create a task that delegates to the given task, preserving the context classloader which was in effect when
this method was invoked.
|
static DirectExecutor |
cleanupExecutor(DirectExecutor delegate,
java.lang.Runnable cleaner)
Create an executor which runs the given cleanup task after running its given task.
|
static java.lang.Runnable |
compositeTask(java.util.Collection<java.lang.Runnable> runnables)
Create a task that is a composite of several other tasks.
|
static java.lang.Runnable |
compositeTask(java.lang.Runnable... runnables)
Create a task that is a composite of several other tasks.
|
static DirectExecutor |
contextClassLoaderExecutor(DirectExecutor delegate,
java.lang.ClassLoader taskClassLoader)
Create a direct executor which runs tasks with the given context class loader.
|
static java.lang.Runnable |
contextClassLoaderResetter()
Get a
Runnable which, when executed, clears the thread context class loader (if the caller has sufficient
privileges). |
static DependencyTaskBuilder |
dependencyTaskBuilder(java.util.concurrent.Executor executor,
java.lang.Runnable task)
Create a builder for a dependent task.
|
static BlockingExecutor |
directBlockingExecutor(DirectExecutor delegate)
An executor which delegates to the given direct executor, but implements the blocking executor interface.
|
static DirectExecutor |
directExecutor()
Get the direct executor.
|
static DirectExecutorService |
directExecutorService()
Get the direct executor service.
|
static DirectExecutor |
discardingExecutor()
Get the discarding executor.
|
static DirectExecutorService |
discardingExecutorService()
Get the discarding executor service.
|
static java.util.concurrent.RejectedExecutionHandler |
discardOldestPolicy()
Get the discard-oldest policy for a
ThreadPoolExecutor. |
static java.util.concurrent.RejectedExecutionHandler |
discardPolicy()
Get the discard policy for a
ThreadPoolExecutor. |
static DirectExecutor |
exceptionLoggingExecutor(DirectExecutor delegate)
Create a direct executor which consumes and logs errors that are thrown to the default thread error category
"org.jboss.threads.errors". |
static DirectExecutor |
exceptionLoggingExecutor(DirectExecutor delegate,
org.jboss.logging.Logger log)
Create a direct executor which consumes and logs errors that are thrown.
|
static DirectExecutor |
exceptionLoggingExecutor(DirectExecutor delegate,
org.jboss.logging.Logger log,
org.jboss.logging.Logger.Level level)
Create a direct executor which consumes and logs errors that are thrown.
|
static void |
executeUninterruptibly(java.util.concurrent.Executor executor,
java.lang.Runnable task)
Execute a task uninterruptibly.
|
static java.util.concurrent.Executor |
executor(WrappingExecutor delegate,
DirectExecutor taskWrapper)
An executor which delegates to a wrapping executor, wrapping each task in a task wrapper.
|
static java.lang.Runnable |
executorTask(DirectExecutor executor,
java.lang.Runnable task)
Get a task that runs the given task through the given direct executor.
|
private static <R extends java.lang.Runnable,A> |
failed(TaskNotifier<? super R,? super A> notifier,
java.lang.Throwable reason,
R runnable,
A attachment) |
private static <R extends java.lang.Runnable,A> |
finished(TaskNotifier<? super R,? super A> notifier,
R runnable,
A attachment) |
(package private) static java.lang.ClassLoader |
getAndSetContextClassLoader(java.lang.Thread thread,
java.lang.ClassLoader newClassLoader)
Privileged method to get and set the context class loader of the given thread.
|
(package private) static java.lang.ClassLoader |
getContextClassLoader(java.lang.Thread thread)
Privileged method to get the context class loader of the given thread.
|
static java.util.concurrent.RejectedExecutionHandler |
handoffPolicy(java.util.concurrent.Executor target)
Get a handoff policy for a
ThreadPoolExecutor. |
static DirectExecutor |
initializingExecutor(DirectExecutor delegate,
java.lang.Runnable initializer)
Create an executor which runs the given initialization task before running its given task.
|
private static <R extends java.lang.Runnable> |
logError(R runnable,
java.lang.Throwable t,
java.lang.String method) |
static java.lang.Thread.UncaughtExceptionHandler |
loggingExceptionHandler()
Get an uncaught exception handler which logs to the default error logger.
|
static java.lang.Thread.UncaughtExceptionHandler |
loggingExceptionHandler(org.jboss.logging.Logger log)
Get an uncaught exception handler which logs to the given logger.
|
static java.lang.Thread.UncaughtExceptionHandler |
loggingExceptionHandler(java.lang.String categoryName)
Get an uncaught exception handler which logs to the given logger.
|
static <A> DirectExecutor |
notifyingDirectExecutor(DirectExecutor delegate,
TaskNotifier<java.lang.Runnable,? super A> notifier,
A attachment)
Get a notifying direct executor.
|
static <R extends java.lang.Runnable,A> |
notifyingRunnable(R task,
TaskNotifier<? super R,? super A> notifier,
A attachment)
Get a notifying runnable wrapper for a task.
|
static java.lang.Runnable |
nullRunnable()
Get the null runnable which does nothing.
|
static DirectExecutor |
privilegedExecutor(DirectExecutor delegate)
Create a direct executor which runs with the privileges given by the current access control context.
|
static DirectExecutor |
privilegedExecutor(DirectExecutor delegate,
java.security.AccessControlContext context)
Create a direct executor which runs with the privileges given by the supplied
AccessControlContext instance. |
static DirectExecutor |
privilegedExecutor(DirectExecutor delegate,
java.lang.Class<?> targetClass)
Create a direct executor which runs with the privileges given by the supplied class' protection domain.
|
static BlockingExecutor |
protectedBlockingExecutor(BlockingExecutor target) |
static BlockingExecutorService |
protectedBlockingExecutorService(BlockingExecutor target)
Wrap a blocking executor with an
BlockingExecutorService instance which supports all the features of
BlockingExecutorService except for shutting down the executor. |
static DirectExecutorService |
protectedDirectExecutorService(DirectExecutor target)
Wrap a direct executor with an
DirectExecutorService instance which supports all the features of ExecutorService
except for shutting down the executor. |
static java.util.concurrent.ExecutorService |
protectedExecutorService(java.util.concurrent.Executor target)
Wrap an executor with an
ExecutorService instance which supports all the features of ExecutorService
except for shutting down the executor. |
static java.util.concurrent.ScheduledExecutorService |
protectedScheduledExecutorService(java.util.concurrent.ScheduledExecutorService target)
Wrap a scheduled executor with a
ScheduledExecutorService instance which supports all the features of
ScheduledExecutorService except for shutting down the executor. |
static DirectExecutor |
rejectingExecutor()
Get the rejecting executor.
|
static DirectExecutor |
rejectingExecutor(java.lang.String message)
Get a rejecting executor.
|
static DirectExecutorService |
rejectingExecutorService()
Get the rejecting executor service.
|
static DirectExecutorService |
rejectingExecutorService(java.lang.String message)
Get the rejecting executor service.
|
static DirectExecutor |
resettingExecutor(DirectExecutor delegate)
Create a direct executor which delegates tasks to the given executor, and then clears all thread-local
data after each task completes (regardless of outcome).
|
static java.util.concurrent.ThreadFactory |
resettingThreadFactory(java.util.concurrent.ThreadFactory delegate)
Create a thread factory which resets all thread-local storage and delegates to the given thread factory.
|
static <R extends java.lang.Runnable,A> |
run(R task,
DirectExecutor directExecutor,
TaskNotifier<? super R,? super A> notifier,
A attachment)
Run a task through the given direct executor, invoking the given notifier with the given attachment.
|
static <R extends java.lang.Runnable,A> |
run(R task,
TaskNotifier<? super R,? super A> notifier,
A attachment)
Run a task, invoking the given notifier with the given attachment.
|
(package private) static void |
setContextClassLoader(java.lang.Thread thread,
java.lang.ClassLoader classLoader)
Privileged method to set the context class loader of the given thread.
|
private static <R extends java.lang.Runnable,A> |
started(TaskNotifier<? super R,? super A> notifier,
R runnable,
A attachment) |
static BlockingExecutor |
threadFactoryExecutor(java.util.concurrent.ThreadFactory factory)
Create an executor that executes each task in a new thread.
|
static BlockingExecutor |
threadFactoryExecutor(java.util.concurrent.ThreadFactory factory,
int maxThreads)
Create an executor that executes each task in a new thread.
|
static BlockingExecutor |
threadFactoryExecutor(java.util.concurrent.ThreadFactory factory,
int maxThreads,
boolean blocking)
Create an executor that executes each task in a new thread.
|
static BlockingExecutor |
threadFactoryExecutor(java.util.concurrent.ThreadFactory factory,
int maxThreads,
boolean blocking,
DirectExecutor taskExecutor)
Create an executor that executes each task in a new thread.
|
static DirectExecutor |
threadFormattedNameExecutor(DirectExecutor delegate,
java.lang.String newName)
Create a direct executor which changes the thread name for the duration of a task using a formatted name.
|
static java.lang.Runnable |
threadLocalResetter()
Get a
Runnable which, when executed, clears the thread-local storage of the calling thread. |
static DirectExecutor |
threadNameExecutor(DirectExecutor delegate,
java.lang.String newName)
Create a direct executor which changes the thread name for the duration of a task.
|
static DirectExecutor |
threadNameNotateExecutor(DirectExecutor delegate,
java.lang.String notation)
Create a direct executor which adds a note to the thread name for the duration of a task.
|
static java.util.concurrent.Executor |
uninterruptibleExecutor(java.util.concurrent.Executor delegate)
Get an executor which executes tasks uninterruptibly in the event of blocking.
|
static java.util.concurrent.Executor |
wrappingExecutor(DirectExecutor taskWrapper,
java.util.concurrent.Executor delegate)
An executor which delegates to another executor, wrapping each task in a task wrapper.
|
static WrappingExecutor |
wrappingExecutor(java.util.concurrent.Executor delegate)
Create a wrapping executor for a delegate executor which creates an
executorTask(DirectExecutor, Runnable) for
each task. |
static java.util.concurrent.ThreadFactory |
wrappingThreadFactory(DirectExecutor taskWrapper,
java.util.concurrent.ThreadFactory delegate)
Creates a thread factory which executes the thread task via the given task wrapping executor.
|
private static final org.jboss.logging.Logger THREAD_ERROR_LOGGER
private static final java.lang.RuntimePermission MODIFY_THREAD_PERMISSION
private static final java.lang.RuntimePermission COPY_CONTEXT_CLASSLOADER_PERMISSION
private static final DirectExecutorService DIRECT_EXECUTOR_SERVICE
private static final DirectExecutorService REJECTING_EXECUTOR_SERVICE
private static final DirectExecutorService DISCARDING_EXECUTOR_SERVICE
private static final BlockingExecutor BLOCKING_DIRECT_EXECUTOR
private static final BlockingExecutor BLOCKING_REJECTING_EXECUTOR
private static final BlockingExecutor BLOCKING_DISCARDING_EXECUTOR
private static final java.util.concurrent.RejectedExecutionHandler ABORT_POLICY
private static final java.util.concurrent.RejectedExecutionHandler CALLER_RUNS_POLICY
private static final java.util.concurrent.RejectedExecutionHandler DISCARD_OLDEST_POLICY
private static final java.util.concurrent.RejectedExecutionHandler DISCARD_POLICY
private static final java.lang.Runnable TCCL_RESETTER
private static final java.lang.Runnable NULL_RUNNABLE
private static final java.lang.Runnable THREAD_LOCAL_RESETTER
private static final java.lang.Thread.UncaughtExceptionHandler LOGGING_HANDLER
public static DirectExecutor directExecutor()
public static DirectExecutorService directExecutorService()
public static DirectExecutor rejectingExecutor()
public static DirectExecutor rejectingExecutor(java.lang.String message)
message - the reject messagepublic static DirectExecutorService rejectingExecutorService()
public static DirectExecutorService rejectingExecutorService(java.lang.String message)
message - the reject messagepublic static DirectExecutor discardingExecutor()
public static DirectExecutorService discardingExecutorService()
public static DirectExecutor privilegedExecutor(DirectExecutor delegate, java.security.AccessControlContext context)
AccessControlContext instance.delegate - the executor to delegate to at the privileged levelcontext - the AccessControlContext to usepublic static DirectExecutor privilegedExecutor(DirectExecutor delegate, java.lang.Class<?> targetClass) throws java.lang.SecurityException
delegate - the executor to delegate to at the privileged leveltargetClass - the target class whose protection domain should be usedjava.lang.SecurityException - if there is a security manager installed and the caller lacks the "getProtectionDomain" RuntimePermissionpublic static DirectExecutor privilegedExecutor(DirectExecutor delegate)
delegate - the executor to delegate to at the privileged levelpublic static DirectExecutor contextClassLoaderExecutor(DirectExecutor delegate, java.lang.ClassLoader taskClassLoader)
delegate - the executor to delegate totaskClassLoader - the context class loader to usepublic static DirectExecutor threadNameExecutor(DirectExecutor delegate, java.lang.String newName)
delegate - the executor to delegate tonewName - the thread name to usepublic static DirectExecutor threadFormattedNameExecutor(DirectExecutor delegate, java.lang.String newName)
JBossThread.delegate - the executor to delegate tonewName - the thread name to usepublic static DirectExecutor threadNameNotateExecutor(DirectExecutor delegate, java.lang.String notation)
delegate - the executor to delegate tonotation - the note to usepublic static DirectExecutor exceptionLoggingExecutor(DirectExecutor delegate, org.jboss.logging.Logger log)
delegate - the executor to delegate tolog - the logger to which exceptions are written at the error levelpublic static DirectExecutor exceptionLoggingExecutor(DirectExecutor delegate, org.jboss.logging.Logger log, org.jboss.logging.Logger.Level level)
delegate - the executor to delegate tolog - the logger to which exceptions are writtenlevel - the level at which to log exceptionspublic static DirectExecutor exceptionLoggingExecutor(DirectExecutor delegate)
"org.jboss.threads.errors".delegate - the executor to delegate topublic static DirectExecutor resettingExecutor(DirectExecutor delegate) throws java.lang.SecurityException
RuntimePermission("modifyThread")
permission to use this method.delegate - the delegate direct executorjava.lang.SecurityException - if the caller does not have the RuntimePermission("modifyThread") permissionpublic static DirectExecutor initializingExecutor(DirectExecutor delegate, java.lang.Runnable initializer)
delegate - the delegate direct executorinitializer - the initialization taskpublic static DirectExecutor cleanupExecutor(DirectExecutor delegate, java.lang.Runnable cleaner)
delegate - the delegate direct executorcleaner - the cleanup taskpublic static BlockingExecutor blockingDirectExecutor()
BlockingExecutor.public static BlockingExecutor blockingDiscardingExecutor()
BlockingExecutor.public static BlockingExecutor blockingRejectingExecutor()
BlockingExecutor.public static java.util.concurrent.Executor wrappingExecutor(DirectExecutor taskWrapper, java.util.concurrent.Executor delegate)
taskWrapper - the task wrapperdelegate - the delegate executorpublic static BlockingExecutor directBlockingExecutor(DirectExecutor delegate)
delegate - the delegate direct executorpublic static WrappingExecutor wrappingExecutor(java.util.concurrent.Executor delegate)
executorTask(DirectExecutor, Runnable) for
each task.delegate - the delegate executorpublic static java.util.concurrent.Executor executor(WrappingExecutor delegate, DirectExecutor taskWrapper)
delegate - the delegate executortaskWrapper - the task wrapperpublic static BlockingExecutor threadFactoryExecutor(java.util.concurrent.ThreadFactory factory)
factory - the thread factory to usepublic static BlockingExecutor threadFactoryExecutor(java.util.concurrent.ThreadFactory factory, int maxThreads)
factory - the thread factory to usemaxThreads - the maximum number of allowed threadspublic static BlockingExecutor threadFactoryExecutor(java.util.concurrent.ThreadFactory factory, int maxThreads, boolean blocking)
blocking parameter.factory - the thread factory to usemaxThreads - the maximum number of allowed threadsblocking - true if the submitter should block when the maximum number of threads has been reachedpublic static BlockingExecutor threadFactoryExecutor(java.util.concurrent.ThreadFactory factory, int maxThreads, boolean blocking, DirectExecutor taskExecutor)
blocking parameter.factory - the thread factory to usemaxThreads - the maximum number of allowed threadsblocking - true if the submitter should block when the maximum number of threads has been reachedtaskExecutor - the executor which should run each taskpublic static java.util.concurrent.RejectedExecutionHandler abortPolicy()
ThreadPoolExecutor.ThreadPoolExecutor.AbortPolicypublic static java.util.concurrent.RejectedExecutionHandler callerRunsPolicy()
ThreadPoolExecutor.ThreadPoolExecutor.CallerRunsPolicypublic static java.util.concurrent.RejectedExecutionHandler discardOldestPolicy()
ThreadPoolExecutor.ThreadPoolExecutor.DiscardOldestPolicypublic static java.util.concurrent.RejectedExecutionHandler discardPolicy()
ThreadPoolExecutor.ThreadPoolExecutor.DiscardPolicypublic static java.util.concurrent.RejectedExecutionHandler handoffPolicy(java.util.concurrent.Executor target)
ThreadPoolExecutor. The returned instance will
delegate to another executor in the event that the task is rejected.target - the target executorpublic static BlockingExecutor protectedBlockingExecutor(BlockingExecutor target)
public static java.util.concurrent.ExecutorService protectedExecutorService(java.util.concurrent.Executor target)
ExecutorService instance which supports all the features of ExecutorService
except for shutting down the executor.target - the target executorpublic static DirectExecutorService protectedDirectExecutorService(DirectExecutor target)
DirectExecutorService instance which supports all the features of ExecutorService
except for shutting down the executor.target - the target executorpublic static java.util.concurrent.ScheduledExecutorService protectedScheduledExecutorService(java.util.concurrent.ScheduledExecutorService target)
ScheduledExecutorService instance which supports all the features of
ScheduledExecutorService except for shutting down the executor.target - the target executorpublic static BlockingExecutorService protectedBlockingExecutorService(BlockingExecutor target)
BlockingExecutorService instance which supports all the features of
BlockingExecutorService except for shutting down the executor.target - the target executorpublic static java.util.concurrent.ThreadFactory resettingThreadFactory(java.util.concurrent.ThreadFactory delegate)
throws java.lang.SecurityException
RuntimePermission("modifyThread") permission to use this method.delegate - the delegate thread factoryjava.lang.SecurityException - if the caller does not have the RuntimePermission("modifyThread")
permissionpublic static java.util.concurrent.ThreadFactory wrappingThreadFactory(DirectExecutor taskWrapper, java.util.concurrent.ThreadFactory delegate)
taskWrapper - the task wrapping executordelegate - the delegate thread factorypublic static java.lang.Runnable nullRunnable()
public static java.lang.Runnable threadLocalResetter()
throws java.lang.SecurityException
Runnable which, when executed, clears the thread-local storage of the calling thread.
You must have the RuntimePermission("modifyThread")
permission to use this method.java.lang.SecurityException - if the caller does not have the RuntimePermission("modifyThread")
permissionpublic static java.lang.Runnable contextClassLoaderResetter()
Runnable which, when executed, clears the thread context class loader (if the caller has sufficient
privileges).public static java.lang.Runnable executorTask(DirectExecutor executor, java.lang.Runnable task)
executor - the executor to run the task throughtask - the task to runpublic static java.lang.Runnable compositeTask(java.lang.Runnable... runnables)
runnables - the taskspublic static java.lang.Runnable classLoaderPreservingTask(java.lang.Runnable delegate)
throws java.lang.SecurityException
delegate - the delegate runnablejava.lang.SecurityException - if a security manager exists and the caller does not have the "copyClassLoader"
RuntimePermission.static java.lang.ClassLoader getContextClassLoader(java.lang.Thread thread)
thread - the thread to introspectstatic java.lang.ClassLoader getAndSetContextClassLoader(java.lang.Thread thread,
java.lang.ClassLoader newClassLoader)
thread - the thread to introspectnewClassLoader - the new context class loaderstatic void setContextClassLoader(java.lang.Thread thread,
java.lang.ClassLoader classLoader)
thread - the thread to introspectclassLoader - the new context class loaderpublic static java.lang.Runnable compositeTask(java.util.Collection<java.lang.Runnable> runnables)
runnables - the tasksstatic void checkAccess(java.security.Permission permission)
public static java.lang.Thread.UncaughtExceptionHandler loggingExceptionHandler(org.jboss.logging.Logger log)
log - the loggerpublic static java.lang.Thread.UncaughtExceptionHandler loggingExceptionHandler(java.lang.String categoryName)
categoryName - the name of the logger category to log topublic static java.lang.Thread.UncaughtExceptionHandler loggingExceptionHandler()
private static <R extends java.lang.Runnable> void logError(R runnable,
java.lang.Throwable t,
java.lang.String method)
private static <R extends java.lang.Runnable,A> void started(TaskNotifier<? super R,? super A> notifier, R runnable, A attachment)
private static <R extends java.lang.Runnable,A> void finished(TaskNotifier<? super R,? super A> notifier, R runnable, A attachment)
private static <R extends java.lang.Runnable,A> void failed(TaskNotifier<? super R,? super A> notifier, java.lang.Throwable reason, R runnable, A attachment)
public static <R extends java.lang.Runnable,A> void run(R task,
DirectExecutor directExecutor,
TaskNotifier<? super R,? super A> notifier,
A attachment)
R - the task typeA - the attachment typetask - the taskdirectExecutor - the executornotifier - the notifierattachment - the attachmentpublic static <R extends java.lang.Runnable,A> void run(R task,
TaskNotifier<? super R,? super A> notifier,
A attachment)
R - the task typeA - the attachment typetask - the tasknotifier - the notifierattachment - the attachmentpublic static <R extends java.lang.Runnable,A> java.lang.Runnable notifyingRunnable(R task,
TaskNotifier<? super R,? super A> notifier,
A attachment)
R - the task typeA - the attachment typetask - the tasknotifier - the notifierattachment - the attachmentpublic static <A> DirectExecutor notifyingDirectExecutor(DirectExecutor delegate, TaskNotifier<java.lang.Runnable,? super A> notifier, A attachment)
A - the attachment typedelegate - the executor which will actually run the tasknotifier - the notifierattachment - the attachmentpublic static void executeUninterruptibly(java.util.concurrent.Executor executor,
java.lang.Runnable task)
throws java.util.concurrent.RejectedExecutionException
executor - the executor to delegate totask - the task to executejava.util.concurrent.RejectedExecutionException - if the task was rejected by the executorpublic static java.util.concurrent.Executor uninterruptibleExecutor(java.util.concurrent.Executor delegate)
delegate - the delegate executorpublic static DependencyTaskBuilder dependencyTaskBuilder(java.util.concurrent.Executor executor, java.lang.Runnable task)
executor - the executor to usetask - the task to run when all dependencies are met