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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aggregate(StepExecution result, java.util.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 Detail

    - #### DefaultStepExecutionAggregator

          public DefaultStepExecutionAggregator()

  - ### Method Detail

    - #### aggregate

          public void aggregate(StepExecution result,
                                java.util.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)`