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 java.lang.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 and Description
    `SimplePartitioner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.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 Detail

    - #### SimplePartitioner

          public SimplePartitioner()

  - ### Method Detail

    - #### partition

          public java.util.Map<java.lang.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