Package org.openspaces.core.executor
Class TaskExecutors
java.lang.Object
org.openspaces.core.executor.TaskExecutors
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskExecutorServicenewExecutorService(GigaSpace gigaSpace) Constructs a newDefaultTaskExecutorServicewhich is an executor service that can execute tasks on top of the Space.static <T extends Serializable,R>
DistributedTask<T,R> privilegedTask(DistributedTask<T, R> task) Constructs a new privileged task wrapping the actual task to execute.static <T extends Serializable,R>
DistributedTask<T,R> privilegedTask(DistributedTask<T, R> task, AsyncResultFilter<T> filter) Constructs a new privileged task wrapping the actual task and filter to execute.static <T extends Serializable>
Task<T>privilegedTask(Task<T> task) Constructs a new privileged task wrapping the actual task to execute.static <T extends Serializable>
Task<T>Constructs a new runnable task adapter with the runnable torun.static <T extends Serializable,R>
DistributedTask<T,R> task(Runnable runnable, AsyncResultsReducer<T, R> reducer) Constructs a new runnable distributed task adapter with a separate reducer.static <T extends Serializable,R>
DistributedTask<T,R> task(Runnable runnable, AsyncResultsReducer<T, R> reducer, AsyncResultFilter<T> filter) Constructs a new runnable distributed task adapter with a separate reducer and filter.static <T extends Serializable>
Task<T>Constructs a new runnable task adapter with the runnable torun.static <T extends Serializable,R>
DistributedTask<T,R> task(Runnable runnable, T result, AsyncResultsReducer<T, R> reducer) Constructs a new runnable distributed task adapter with a separate reducer.static <T extends Serializable,R>
DistributedTask<T,R> task(Runnable runnable, T result, AsyncResultsReducer<T, R> reducer, AsyncResultFilter<T> filter) Constructs a new runnable distributed task adapter with a separate reducer and filter.static <T extends Serializable>
Task<T>Constructs a new callable task adapter with the callable tocall.static <T extends Serializable,R>
DistributedTask<T,R> task(Callable<T> callable, AsyncResultsReducer<T, R> reducer) Constructs a new callable distributed task adapter with a separate reducer.static <T extends Serializable,R>
DistributedTask<T,R> task(Callable<T> callable, AsyncResultsReducer<T, R> reducer, AsyncResultFilter<T> filter) Constructs a new callable distributed task adapter with a separate reducer and filter.
-
Constructor Details
-
TaskExecutors
public TaskExecutors()
-
-
Method Details
-
newExecutorService
Constructs a newDefaultTaskExecutorServicewhich is an executor service that can execute tasks on top of the Space. -
task
Constructs a new callable task adapter with the callable tocall. -
task
public static <T extends Serializable,R> DistributedTask<T,R> task(Callable<T> callable, AsyncResultsReducer<T, R> reducer) Constructs a new callable distributed task adapter with a separate reducer. The reducer or the callable can optionally implementAsyncResultFilter. -
task
public static <T extends Serializable,R> DistributedTask<T,R> task(Callable<T> callable, AsyncResultsReducer<T, R> reducer, AsyncResultFilter<T> filter) Constructs a new callable distributed task adapter with a separate reducer and filter. -
task
Constructs a new runnable task adapter with the runnable torun. -
task
public static <T extends Serializable,R> DistributedTask<T,R> task(Runnable runnable, AsyncResultsReducer<T, R> reducer) Constructs a new runnable distributed task adapter with a separate reducer. The reducer or the runnable can optionally implementAsyncResultFilter. -
task
public static <T extends Serializable,R> DistributedTask<T,R> task(Runnable runnable, AsyncResultsReducer<T, R> reducer, AsyncResultFilter<T> filter) Constructs a new runnable distributed task adapter with a separate reducer and filter. -
task
public static <T extends Serializable,R> DistributedTask<T,R> task(Runnable runnable, T result, AsyncResultsReducer<T, R> reducer) Constructs a new runnable distributed task adapter with a separate reducer. The reducer or the runnable can optionally implementAsyncResultFilter. -
task
public static <T extends Serializable,R> DistributedTask<T,R> task(Runnable runnable, T result, AsyncResultsReducer<T, R> reducer, AsyncResultFilter<T> filter) Constructs a new runnable distributed task adapter with a separate reducer and filter. -
task
Constructs a new runnable task adapter with the runnable torun. Will return the result after the call torun. -
privilegedTask
Constructs a new privileged task wrapping the actual task to execute. -
privilegedTask
public static <T extends Serializable,R> DistributedTask<T,R> privilegedTask(DistributedTask<T, R> task) Constructs a new privileged task wrapping the actual task to execute. -
privilegedTask
public static <T extends Serializable,R> DistributedTask<T,R> privilegedTask(DistributedTask<T, R> task, AsyncResultFilter<T> filter) Constructs a new privileged task wrapping the actual task and filter to execute.
-