org.springframework.batch.core.partition.support
Class SimplePartitioner
java.lang.Object
org.springframework.batch.core.partition.support.SimplePartitioner
- All Implemented Interfaces:
- Partitioner
public class SimplePartitioner
- extends Object
- implements 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimplePartitioner
public SimplePartitioner()
partition
public Map<String,ExecutionContext> partition(int gridSize)
- Description copied from interface:
Partitioner
- Create a set of distinct
ExecutionContext
instances 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:
partition
in interface Partitioner
- Parameters:
gridSize
- the size of the map to return
- Returns:
- a map from identifier to input parameters
Copyright © 2009 SpringSource. All Rights Reserved.