Package org.apache.cassandra.concurrent
Interface TaskFactory
-
- All Known Implementing Classes:
TaskFactory.LocalAware,TaskFactory.Standard
public interface TaskFactoryA simple mechanism to impose our desired semantics on the execution of a task without requiring a specialised executor service. We wrap tasks in a suitableFutureTaskor encapsulatingRunnable.The encapsulations handle any exceptions in our standard way, as well as ensuring
ExecutorLocalsare propagated in the case oflocalAware()
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTaskFactory.LocalAwarestatic classTaskFactory.Standard
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static TaskFactorylocalAware()static TaskFactorystandard()java.lang.RunnabletoExecute(java.lang.Runnable runnable)java.lang.RunnabletoExecute(WithResources withResources, 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)<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)
-
-
-
Method Detail
-
toExecute
java.lang.Runnable toExecute(java.lang.Runnable runnable)
-
toSubmit
<T> RunnableFuture<T> toSubmit(java.lang.Runnable runnable)
-
toSubmit
<T> RunnableFuture<T> toSubmit(java.lang.Runnable runnable, T result)
-
toSubmit
<T> RunnableFuture<T> toSubmit(java.util.concurrent.Callable<T> callable)
-
toExecute
java.lang.Runnable toExecute(WithResources withResources, java.lang.Runnable runnable)
-
toSubmit
<T> RunnableFuture<T> toSubmit(WithResources withResources, java.lang.Runnable runnable)
-
toSubmit
<T> RunnableFuture<T> toSubmit(WithResources withResources, java.lang.Runnable runnable, T result)
-
toSubmit
<T> RunnableFuture<T> toSubmit(WithResources withResources, java.util.concurrent.Callable<T> callable)
-
standard
static TaskFactory standard()
-
localAware
static TaskFactory localAware()
-
-