|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.core.ExecutorBuilder<T,R>
public class ExecutorBuilder<T extends Serializable,R>
The executor builder allows to combine all the different types of executing tasks into a single execution (of course, the execution itself, of all the tasks, is asynchronous). Similar to map reduce where first all the tasks are defined, and then executed, and later on, reduced.
GigaSpace.executorBuilder(com.gigaspaces.async.AsyncResultsReducer)
Method Summary | |
---|---|
ExecutorBuilder<T,R> |
add(DistributedTask<T,R> task)
Adds a task to be executed similarly to GigaSpace.execute(org.openspaces.core.executor.DistributedTask) |
ExecutorBuilder<T,R> |
add(DistributedTask<T,R> task,
Object... routing)
Adds a task to be executed similarly to GigaSpace.execute(org.openspaces.core.executor.DistributedTask, Object[]) |
ExecutorBuilder<T,R> |
add(Task<T> task)
Adds a task to be executed similarly to GigaSpace.execute(org.openspaces.core.executor.Task) . |
ExecutorBuilder<T,R> |
add(Task<T> task,
AsyncFutureListener<T> listener)
Adds a task to be executed similarly to GigaSpace.execute(org.openspaces.core.executor.Task) . |
ExecutorBuilder<T,R> |
add(Task<T> task,
Object routing)
Adds a task to be executed similarly to GigaSpace.execute(org.openspaces.core.executor.Task, Object) . |
AsyncFuture<R> |
execute()
Executes all the given tasks (asynchronously) based on their execution mode and returns a future allowing to retrieve the reduced operation of all the tasks. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ExecutorBuilder<T,R> add(Task<T> task)
GigaSpace.execute(org.openspaces.core.executor.Task)
.
task
- The task to add
execute()
.GigaSpace.execute(org.openspaces.core.executor.Task)
public ExecutorBuilder<T,R> add(Task<T> task, AsyncFutureListener<T> listener)
GigaSpace.execute(org.openspaces.core.executor.Task)
.
task
- The task to add
execute()
.GigaSpace.execute(org.openspaces.core.executor.Task)
public ExecutorBuilder<T,R> add(Task<T> task, Object routing)
GigaSpace.execute(org.openspaces.core.executor.Task, Object)
.
task
- The task to add
execute()
.GigaSpace.execute(org.openspaces.core.executor.Task, Object)
public ExecutorBuilder<T,R> add(DistributedTask<T,R> task, Object... routing)
GigaSpace.execute(org.openspaces.core.executor.DistributedTask, Object[])
task
- The task to add
execute()
.GigaSpace.execute(org.openspaces.core.executor.DistributedTask, Object[])
public ExecutorBuilder<T,R> add(DistributedTask<T,R> task)
GigaSpace.execute(org.openspaces.core.executor.DistributedTask)
task
- The task to add
execute()
.GigaSpace.execute(org.openspaces.core.executor.DistributedTask)
public AsyncFuture<R> execute()
The future actual result will be the reduced result of the execution, or the exception thrown during
during the reduce operation. The moderator (assuming the reducer provided implements
AsyncResultFilter
) can be used as a mechanism to listen for results as they arrive.
get()
method will return the task value upon completion.
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |