
Grid task interface defines a task that can be executed on the grid. Grid task is responsible for splitting business logic into multiple grid jobs, receiving results from individual grid jobs executing on remote nodes, and reducing (aggregating) received jobs' results into final grid task result. More...
Upon request to execute a task, the system will do the following:
Once job execution results become available method IComputeTask<A,T,R>.Result(IComputeJobResult<T>, IList<IComputeJobResult<T>>) will be called for ech received job result. The policy returned by this method will determine the way task reacts to every job result.
If ComputeJobResultPolicy.WAIT is returned, task will continue to wait for other job results. If this result is the last job result, then reduce phase will be started.
If ComputeJobResultPolicy.REDUCE is returned, reduce phase will be started right away without waiting for other jobs completion (all remaining jobs will receive cancel request).
If ComputeJobResultPolicy.FAILOVER is returned, job will be failed over to another node for execution. Note that if you use ComputeTaskAdapter<A,T,R>, it will automatically fail jobs to another node for 2 well-known failure cases: 1) job has failed to due to node crash (in this case IComputeJobResult<T>.Exception() will return ClusterTopologyException); 2) job execution was rejected, i.e. remote node has cancelled job before it got a chance to execute, while it still was on the waiting list. (in this case IComputeJobResult<T>.Exception() will return ComputeExecutionRejectedException).
| A | Argument type. |
| T | Type of job result. |
| R | Type of reduce result. |
1.8.11