Package org.springframework.batch.core.partition.support

# Class DefaultStepExecutionAggregator

java.lang.Object
org.springframework.batch.core.partition.support.DefaultStepExecutionAggregator

All Implemented Interfaces:
  `StepExecutionAggregator`

public class DefaultStepExecutionAggregator extends Object implements StepExecutionAggregator
Convenience class for aggregating a set of `StepExecution` instances into a single result.

Since:
  2.1
Author:
  Dave Syer

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultStepExecutionAggregator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `aggregate(StepExecution result, Collection<StepExecution> executions)`
  Aggregates the input executions into the result `StepExecution`.

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

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

- ## Constructor Details

  - ### DefaultStepExecutionAggregator

    public DefaultStepExecutionAggregator()

- ## Method Details

  - ### aggregate

    public void aggregate(StepExecution result, Collection<StepExecution> executions)
    Aggregates the input executions into the result `StepExecution`. The aggregated fields are
    - status - choosing the highest value using `BatchStatus.max(BatchStatus, BatchStatus)`
    - exitStatus - using `ExitStatus.and(ExitStatus)`
    - commitCount, rollbackCount, etc. - by arithmetic sum
    Specified by:
      `aggregate` in interface `StepExecutionAggregator`
    Parameters:
      `result` - the result to overwrite
      `executions` - the inputs
    See Also:
      - `#aggregate(StepExecution, Collection)`