Package org.springframework.batch.core

# Class StepContribution

java.lang.Object
org.springframework.batch.core.StepContribution

All Implemented Interfaces:
  `Serializable`

public class StepContribution extends Object implements Serializable
Represents a contribution to a `StepExecution`, buffering changes until they can be applied at a chunk boundary.

Author:
  Dave Syer, Mahmoud Ben Hassine
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StepContribution(StepExecution execution)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `ExitStatus`
  `getExitStatus()`
  Public getter for the status.
  `long`
  `getFilterCount()`
  Public getter for the filter counter.
  `long`
  `getProcessSkipCount()`
  Public getter for the process skip count.
  `long`
  `getReadCount()`
  Public access to the read counter.
  `long`
  `getReadSkipCount()`
  `long`
  `getSkipCount()`
  `StepExecution`
  `getStepExecution()`
  Public getter for the parent step execution of this contribution.
  `long`
  `getStepSkipCount()`
  `long`
  `getWriteCount()`
  Public access to the write counter.
  `long`
  `getWriteSkipCount()`
  `int`
  `hashCode()`
  `void`
  `incrementFilterCount(long count)`
  Increment the counter for the number of items processed.
  `void`
  `incrementProcessSkipCount()`
  `void`
  `incrementReadCount()`
  Increment the counter for the number of items read.
  `void`
  `incrementReadSkipCount()`
  Increment the read skip count for this contribution
  `void`
  `incrementReadSkipCount(long count)`
  Increment the read skip count for this contribution
  `void`
  `incrementWriteCount(long count)`
  Increment the counter for the number of items written.
  `void`
  `incrementWriteSkipCount()`
  Increment the write skip count for this contribution
  `void`
  `setExitStatus(ExitStatus status)`
  Set the `ExitStatus` for this contribution.
  `String`
  `toString()`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### StepContribution

    public StepContribution(StepExecution execution)
    Parameters:
      `execution` - `StepExecution` the stepExecution used to initialize `skipCount`.

- ## Method Details

  - ### setExitStatus

    public void setExitStatus(ExitStatus status)
    Set the `ExitStatus` for this contribution.
    Parameters:
      `status` - `ExitStatus` instance to be used to set the exit status.

  - ### getExitStatus

    public ExitStatus getExitStatus()
    Public getter for the status.
    Returns:
      the `ExitStatus` for this contribution

  - ### incrementFilterCount

    public void incrementFilterCount(long count)
    Increment the counter for the number of items processed.
    Parameters:
      `count` - long amount to increment by.

  - ### incrementReadCount

    public void incrementReadCount()
    Increment the counter for the number of items read.

  - ### incrementWriteCount

    public void incrementWriteCount(long count)
    Increment the counter for the number of items written.
    Parameters:
      `count` - long amount to increment by.

  - ### getReadCount

    public long getReadCount()
    Public access to the read counter.
    Returns:
      the item counter.

  - ### getWriteCount

    public long getWriteCount()
    Public access to the write counter.
    Returns:
      the item counter.

  - ### getFilterCount

    public long getFilterCount()
    Public getter for the filter counter.
    Returns:
      the filter counter

  - ### getStepSkipCount

    public long getStepSkipCount()
    Returns:
      the sum of skips accumulated in the parent `StepExecution` and this `StepContribution`.

  - ### getSkipCount

    public long getSkipCount()
    Returns:
      the number of skips collected in this `StepContribution` (not including skips accumulated in the parent `StepExecution`).

  - ### incrementReadSkipCount

    public void incrementReadSkipCount()
    Increment the read skip count for this contribution

  - ### incrementReadSkipCount

    public void incrementReadSkipCount(long count)
    Increment the read skip count for this contribution
    Parameters:
      `count` - long amount to increment by.

  - ### incrementWriteSkipCount

    public void incrementWriteSkipCount()
    Increment the write skip count for this contribution

  - ### incrementProcessSkipCount

    public void incrementProcessSkipCount()

  - ### getReadSkipCount

    public long getReadSkipCount()
    Returns:
      the read skip count

  - ### getWriteSkipCount

    public long getWriteSkipCount()
    Returns:
      the write skip count

  - ### getProcessSkipCount

    public long getProcessSkipCount()
    Public getter for the process skip count.
    Returns:
      the process skip count

  - ### getStepExecution

    public StepExecution getStepExecution()
    Public getter for the parent step execution of this contribution.
    Returns:
      parent step execution of this contribution

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`
    See Also:
      - `Object.equals(java.lang.Object)`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`
    See Also:
      - `Object.hashCode()`