Class SimplePartitioner
java.lang.Object
org.springframework.batch.core.partition.support.SimplePartitioner
- All Implemented Interfaces:
Partitioner
Simplest possible implementation of
Partitioner. Just creates a set of empty
ExecutionContext instances, and labels them as
{partition0, partition1, ..., partitionN}, where N is the
grid size.- Since:
- 2.0
- Author:
- Dave Syer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpartition(int gridSize) Create a set of distinctExecutionContextinstances together with a unique identifier for each one.
-
Constructor Details
-
SimplePartitioner
public SimplePartitioner()
-
-
Method Details
-
partition
Description copied from interface:PartitionerCreate a set of distinctExecutionContextinstances together with a unique identifier for each one. The identifiers should be short, mnemonic values, and only have to be unique within the return value (e.g. use an incrementer).- Specified by:
partitionin interfacePartitioner- Parameters:
gridSize- the size of the map to return- Returns:
- a map from identifier to input parameters
-