org.springframework.batch.core
Class StepContribution

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

public class StepContribution
extends Object

Represents a contribution to a StepExecution, buffering changes until they can be applied at a chunk boundary.

Author:
Dave Syer

Constructor Summary
StepContribution(StepExecution execution)
           
 
Method Summary
 void combineSkipCounts()
          Combine the skip counts and reset read skips to zero.
 int getCommitCount()
          Public getter for the commit counter.
 int getItemCount()
          Public access to the item counter.
 int getReadSkipCount()
           
 int getSkipCount()
           
 int getStepSkipCount()
           
 void incrementCommitCount()
          Increment the commit counter.
 void incrementItemCount()
          Increment the counter for the number of items processed.
 void incrementReadSkipCount()
          Increment the counter for skipped reads
 void incrementSkipCount()
          Increment the total skip count for this contribution
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StepContribution

public StepContribution(StepExecution execution)
Parameters:
execution -
Method Detail

incrementItemCount

public void incrementItemCount()
Increment the counter for the number of items processed.


getItemCount

public int getItemCount()
Public access to the item counter.

Returns:
the item counter.

incrementCommitCount

public void incrementCommitCount()
Increment the commit counter.


getCommitCount

public int getCommitCount()
Public getter for the commit counter.

Returns:
the commitCount

getStepSkipCount

public int getStepSkipCount()
Returns:
the sum of skips accumulated in the parent StepExecution and this StepContribution, including uncommitted read skips.

getSkipCount

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

incrementSkipCount

public void incrementSkipCount()
Increment the total skip count for this contribution


incrementReadSkipCount

public void incrementReadSkipCount()
Increment the counter for skipped reads


getReadSkipCount

public int getReadSkipCount()
Returns:
the read skip count

combineSkipCounts

public void combineSkipCounts()
Combine the skip counts and reset read skips to zero.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 SpringSource. All Rights Reserved.