Class BasicPartitioner
- java.lang.Object
- org.springframework.batch.core.partition.support.SimplePartitioner
- org.springframework.batch.sample.remotepartitioning.BasicPartitioner
- All Implemented Interfaces:
Partitioner
public class BasicPartitioner extends SimplePartitioner
Simple partitioner for demonstration purpose.- Author:
- Mahmoud Ben Hassine
Constructor Summary
Constructors Constructor Description BasicPartitioner()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,ExecutionContext>partition(int gridSize)Create a set of distinctExecutionContextinstances together with a unique identifier for each one.
Method Detail
partition
public java.util.Map<java.lang.String,ExecutionContext> partition(int gridSize)
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- Overrides:
partitionin classSimplePartitioner- Parameters:
gridSize- the size of the map to return- Returns:
- a map from identifier to input parameters