A - Task argument type.R - Task result type.public abstract class VisorMultiNodeTask<A,R,J> extends Object implements GridComputeTask<GridBiTuple<Set<UUID>,A>,R>
| Constructor and Description |
|---|
VisorMultiNodeTask() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract VisorJob<A,J> |
job(A arg) |
Map<? extends GridComputeJob,GridNode> |
map(List<GridNode> subgrid,
GridBiTuple<Set<UUID>,A> arg)
This method is called to map or split grid task into multiple grid jobs.
|
GridComputeJobResultPolicy |
result(GridComputeJobResult res,
List<GridComputeJobResult> rcvd)
Asynchronous callback invoked every time a result from remote execution is
received.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreduceprotected A taskArg
@Nullable public Map<? extends GridComputeJob,GridNode> map(List<GridNode> subgrid, @Nullable GridBiTuple<Set<UUID>,A> arg) throws GridException
map in interface GridComputeTask<GridBiTuple<Set<UUID>,A>,R>subgrid - Nodes available for this task execution. Note that order of nodes is
guaranteed to be randomized by container. This ensures that every time
you simply iterate through grid nodes, the order of nodes will be random which
over time should result into all nodes being used equally.arg - Task execution argument. Can be null. This is the same argument
as the one passed into Grid#execute(...) methods.GridComputeTaskContinuousMapper is
injected into task, if null or empty map is returned, exception will be thrown.GridException - If mapping could not complete successfully. This exception will be
thrown out of GridComputeTaskFuture.get() method.public GridComputeJobResultPolicy result(GridComputeJobResult res, List<GridComputeJobResult> rcvd) throws GridException
GridComputeJobResultPolicy for more information about result policies.result in interface GridComputeTask<GridBiTuple<Set<UUID>,A>,R>res - Received remote grid executable result.rcvd - All previously received results. Note that if task class has
GridComputeTaskNoResultCache annotation, then this list will be empty.GridException - If handling a job result caused an error. This exception will
be thrown out of GridComputeTaskFuture.get() method.Copyright © 2014. All rights reserved.