public class ExecutorBuilder<T extends Serializable,R> extends Object
GigaSpace.executorBuilder(com.gigaspaces.async.AsyncResultsReducer)| Modifier and Type | Method and Description |
|---|---|
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.
|
public ExecutorBuilder<T,R> add(Task<T> task)
GigaSpace.execute(org.openspaces.core.executor.Task).task - The task to addexecute().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 addexecute().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 addexecute().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 addexecute().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 addexecute().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.Copyright © GigaSpaces.