@GridInternal public class VisorGatewayTask extends Object implements ComputeTask<Object[],Object>
| Modifier and Type | Field and Description |
|---|---|
protected IgniteEx |
ignite
Auto-injected grid instance.
|
| Constructor and Description |
|---|
VisorGatewayTask() |
| Modifier and Type | Method and Description |
|---|---|
Map<? extends ComputeJob,ClusterNode> |
map(List<ClusterNode> subgrid,
Object[] args)
This method is called to map or split grid task into multiple grid jobs.
|
Object |
reduce(List<ComputeJobResult> results)
Reduces (or aggregates) results received so far into one compound result to be returned to
caller via
ComputeTaskFuture.get() method. |
ComputeJobResultPolicy |
result(ComputeJobResult res,
List<ComputeJobResult> rcvd)
Asynchronous callback invoked every time a result from remote execution is
received.
|
@IgniteInstanceResource protected transient IgniteEx ignite
@Nullable public Map<? extends ComputeJob,ClusterNode> map(List<ClusterNode> subgrid, @Nullable Object[] args) throws IgniteException
map in interface ComputeTask<Object[],Object>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.args - Task execution argument. Can be null. This is the same argument
as the one passed into Grid#execute(...) methods.ComputeTaskContinuousMapper is
injected into task, if null or empty map is returned, exception will be thrown.IgniteException - If mapping could not complete successfully. This exception will be
thrown out of ComputeTaskFuture.get() method.public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteException
ComputeJobResultPolicy for more information about result policies.result in interface ComputeTask<Object[],Object>res - Received remote grid executable result.rcvd - All previously received results. Note that if task class has
ComputeTaskNoResultCache annotation, then this list will be empty.IgniteException - If handling a job result caused an error. This exception will
be thrown out of ComputeTaskFuture.get() method.@Nullable public Object reduce(List<ComputeJobResult> results) throws IgniteException
ComputeTaskFuture.get() method.
Note, that if some jobs did not succeed and could not be failed over then the list of results passed into this method will include the failed results. Otherwise, failed results will not be in the list.
reduce in interface ComputeTask<Object[],Object>results - Received results of broadcasted remote executions. Note that if task class has
ComputeTaskNoResultCache annotation, then this list will be empty.IgniteException - If reduction or results caused an error. This exception will
be thrown out of ComputeTaskFuture.get() method.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.1.0 Release Date : July 20 2017