Package 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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimplePartitioner()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String,ExecutionContext>`
  `partition(int gridSize)`
  Create a set of distinct `ExecutionContext` instances together with a unique identifier for each one.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SimplePartitioner

    public SimplePartitioner()

- ## Method Details

  - ### 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