Class ComputeClientTask
- java.lang.Object
-
- org.apache.ignite.compute.ComputeTaskAdapter<T,R>
-
- org.apache.ignite.compute.ComputeTaskSplitAdapter<java.util.Collection<BinaryObject>,java.lang.Long>
-
- org.apache.ignite.examples.binary.computegrid.ComputeClientTask
-
- All Implemented Interfaces:
java.io.Serializable,ComputeTask<java.util.Collection<BinaryObject>,java.lang.Long>
public class ComputeClientTask extends ComputeTaskSplitAdapter<java.util.Collection<BinaryObject>,java.lang.Long>
Task that is used forComputeClientBinaryTaskExecutionExampleand similar examples in .NET and C++.This task calculates average salary for provided collection of employees. It splits the collection into batches of size
3and creates a job for each batch. After all jobs are executed, there results are reduced to get the average salary.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ComputeClientTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.Longreduce(java.util.List<ComputeJobResult> results)protected java.util.Collection<? extends ComputeJob>split(int gridSize, java.util.Collection<BinaryObject> arg)-
Methods inherited from class org.apache.ignite.compute.ComputeTaskSplitAdapter
map
-
Methods inherited from class org.apache.ignite.compute.ComputeTaskAdapter
result
-
-
-
-
Method Detail
-
split
protected java.util.Collection<? extends ComputeJob> split(int gridSize, java.util.Collection<BinaryObject> arg)
- Specified by:
splitin classComputeTaskSplitAdapter<java.util.Collection<BinaryObject>,java.lang.Long>
-
reduce
@Nullable public @Nullable java.lang.Long reduce(java.util.List<ComputeJobResult> results)
-
-