This class defines simplified adapter for IComputeTask<A,T,R>. This adapter can be used when jobs can be randomly assigned to available grid nodes. This adapter is sufficient in most homogeneous environments where all nodes are equally suitable for executing grid job, see Split method for more details.
More...
Inherits GridGain.Compute.ComputeTaskAdapter< A, T, R >.
|
| abstract ICollection< IComputeJob< T > > | Split (int gridSize, A arg) |
| | This is a simplified version of IComputeTask<A,T,R>.Map method. This method basically takes given argument and splits it into a collection of GridGain.Compute.IComputeJob using provided grid size as indication of how many node are available. These jobs will be randomly mapped to available grid nodes. Note that if number of jobs is greater than number of grid nodes (i.e, grid size), the grid nodes will be reused and some jobs will end up on the same grid nodes. More...
|
| |
- Parameters
-
| 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 ICompute.Execute() methods. |
- Returns
- Map of grid jobs assigned to subgrid node. If
null or empty map is returned, exception will be thrown.
- Exceptions
-
| GridGain.Common.GridException | Split returned no jobs. |
Implements GridGain.Compute.ComputeTaskAdapter< A, T, R >.
- Parameters
-
| gridSize | Number of available grid nodes. Note that returned number of jobs can be less, equal or greater than this grid size. |
| arg | Task execution argument. Can be null. |