public interface TaskFactory
FutureTask
or encapsulating Runnable
.
The encapsulations handle any exceptions in our standard way, as well as ensuring ExecutorLocals
are
propagated in the case of localAware()
Modifier and Type | Interface and Description |
---|---|
static class |
TaskFactory.LocalAware |
static class |
TaskFactory.Standard |
Modifier and Type | Method and Description |
---|---|
static TaskFactory |
localAware() |
static TaskFactory |
standard() |
java.lang.Runnable |
toExecute(java.lang.Runnable runnable) |
java.lang.Runnable |
toExecute(WithResources withResources,
java.lang.Runnable runnable) |
<T> RunnableFuture<T> |
toSubmit(java.util.concurrent.Callable<T> callable) |
<T> RunnableFuture<T> |
toSubmit(java.lang.Runnable runnable) |
<T> RunnableFuture<T> |
toSubmit(java.lang.Runnable runnable,
T result) |
<T> RunnableFuture<T> |
toSubmit(WithResources withResources,
java.util.concurrent.Callable<T> callable) |
<T> RunnableFuture<T> |
toSubmit(WithResources withResources,
java.lang.Runnable runnable) |
<T> RunnableFuture<T> |
toSubmit(WithResources withResources,
java.lang.Runnable runnable,
T result) |
java.lang.Runnable toExecute(java.lang.Runnable runnable)
<T> RunnableFuture<T> toSubmit(java.lang.Runnable runnable)
<T> RunnableFuture<T> toSubmit(java.lang.Runnable runnable, T result)
<T> RunnableFuture<T> toSubmit(java.util.concurrent.Callable<T> callable)
java.lang.Runnable toExecute(WithResources withResources, java.lang.Runnable runnable)
<T> RunnableFuture<T> toSubmit(WithResources withResources, java.lang.Runnable runnable)
<T> RunnableFuture<T> toSubmit(WithResources withResources, java.lang.Runnable runnable, T result)
<T> RunnableFuture<T> toSubmit(WithResources withResources, java.util.concurrent.Callable<T> callable)
static TaskFactory standard()
static TaskFactory localAware()
Copyright © 2009- The Apache Software Foundation