Interface Partitioner

All Known Implementing Classes:
MultiResourcePartitioner, SimplePartitioner
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Partitioner
Central strategy interface for creating input parameters for a partitioned step in the form of ExecutionContext instances. The usual aim is to create a set of distinct input values, e.g. a set of non-overlapping primary key ranges, or a set of unique filenames.
Since:
2.0
Author:
Dave Syer, Taeik Lim
  • Method Summary

    Modifier and Type
    Method
    Description
    partition(int gridSize)
    Create a set of distinct ExecutionContext instances together with a unique identifier for each one.
  • Method Details

    • partition

      Map<String,ExecutionContext> partition(int gridSize)
      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).
      Parameters:
      gridSize - the size of the map to return
      Returns:
      a map from identifier to input parameters