public class GridCacheQueryJdbcValidationTask extends GridComputeTaskSplitAdapter<String,Boolean>
| Constructor and Description |
|---|
GridCacheQueryJdbcValidationTask() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
reduce(List<GridComputeJobResult> results)
Reduces (or aggregates) results received so far into one compound result to be returned to
caller via
GridComputeTaskFuture.get() method. |
protected Collection<? extends GridComputeJob> |
split(int gridSize,
String cacheName)
This is a simplified version of
GridComputeTask.map(List, Object) method. |
mapresultprotected Collection<? extends GridComputeJob> split(int gridSize, @Nullable String cacheName) throws GridException
GridComputeTask.map(List, Object) method.
This method basically takes given argument and splits it into a collection
of GridComputeJob 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.
split in class GridComputeTaskSplitAdapter<String,Boolean>gridSize - Number of available grid nodes. Note that returned number of
jobs can be less, equal or greater than this grid size.cacheName - Task execution argument. Can be null.GridException - Thrown in case of any errors.GridComputeTask.map(List, Object)public Boolean reduce(List<GridComputeJobResult> results) throws GridException
GridComputeTaskFuture.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.
results - Received results of broadcasted remote executions. Note that if task class has
GridComputeTaskNoResultCache annotation, then this list will be empty.GridException - If reduction or results caused an error. This exception will
be thrown out of GridComputeTaskFuture.get() method.Copyright © 2014. All rights reserved.