GigaSpaces XAP 9.7.2 API

org.openspaces.core.executor
Class TaskExecutors

java.lang.Object
  extended by org.openspaces.core.executor.TaskExecutors

public class TaskExecutors
extends Object

Author:
kimchy

Constructor Summary
TaskExecutors()
           
 
Method Summary
static TaskExecutorService newExecutorService(GigaSpace gigaSpace)
          Constructs a new DefaultTaskExecutorService which 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>
task(Callable<T> callable)
          Constructs a new callable task adapter with the callable to call.
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.
static
<T extends Serializable>
Task<T>
task(Runnable runnable)
          Constructs a new runnable task adapter with the runnable to run.
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>
task(Runnable runnable, T result)
          Constructs a new runnable task adapter with the runnable to run.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskExecutors

public TaskExecutors()
Method Detail

newExecutorService

public static TaskExecutorService newExecutorService(GigaSpace gigaSpace)
Constructs a new DefaultTaskExecutorService which is an executor service that can execute tasks on top of the Space.


task

public static <T extends Serializable> Task<T> task(Callable<T> callable)
Constructs a new callable task adapter with the callable to call.


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 implement AsyncResultFilter.


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

public static <T extends Serializable> Task<T> task(Runnable runnable)
Constructs a new runnable task adapter with the runnable to run.


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 implement AsyncResultFilter.


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 implement AsyncResultFilter.


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

public static <T extends Serializable> Task<T> task(Runnable runnable,
                                                    T result)
Constructs a new runnable task adapter with the runnable to run. Will return the result after the call to run.


privilegedTask

public static <T extends Serializable> Task<T> privilegedTask(Task<T> 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)
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.


GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.