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:
  • 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 ExitStatus.
      Returns:
      the ExitStatus for this contribution
    • incrementFilterCount

      public void incrementFilterCount(long count)
      Increment the counter for the number of items processed.
      Parameters:
      count - The 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 - The long amount to increment by.
    • getReadCount

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

      public long getWriteCount()
      Public access to the write counter.
      Returns:
      the write 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 - The 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()
      Public getter for the read skip count.
      Returns:
      the read skip count.
    • getWriteSkipCount

      public long getWriteSkipCount()
      Public getter for the write skip count.
      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:
    • hashCode

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