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()
          Add the temporary read skip count to read skip count and reset the temporary counter.
 int getCommitCount()
          Public getter for the commit counter.
 int getItemCount()
          Public access to the item counter.
 int getReadSkipCount()
           
 int getSkipCount()
           
 int getStepSkipCount()
           
 int getWriteSkipCount()
           
 void incrementCommitCount()
          Increment the commit counter.
 void incrementItemCount()
          Increment the counter for the number of items processed.
 void incrementReadsSkipCount()
          Increment the read skip count for this contribution
 void incrementTemporaryReadSkipCount()
          Increment the counter for temporary skipped reads
 void incrementWriteSkipCount()
          Increment the write 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.

incrementReadsSkipCount

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


incrementWriteSkipCount

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


incrementTemporaryReadSkipCount

public void incrementTemporaryReadSkipCount()
Increment the counter for temporary skipped reads


getReadSkipCount

public int getReadSkipCount()
Returns:
the read skip count

getWriteSkipCount

public int getWriteSkipCount()
Returns:
the write skip count

combineSkipCounts

public void combineSkipCounts()
Add the temporary read skip count to read skip count and reset the temporary counter.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 SpringSource. All Rights Reserved.