Package org.springframework.batch.core
Class StepContribution
java.lang.Object
org.springframework.batch.core.StepContribution
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanPublic getter for the status.longPublic getter for the filter counter.longPublic getter for the process skip count.longPublic access to the read counter.longlongPublic getter for the parent step execution of this contribution.longlongPublic access to the write counter.longinthashCode()voidincrementFilterCount(long count) Increment the counter for the number of items processed.voidvoidIncrement the counter for the number of items read.voidIncrement the read skip count for this contributionvoidincrementReadSkipCount(long count) Increment the read skip count for this contributionvoidincrementWriteCount(long count) Increment the counter for the number of items written.voidIncrement the write skip count for this contributionvoidsetExitStatus(ExitStatus status) Set theExitStatusfor this contribution.toString()
-
Constructor Details
-
StepContribution
- Parameters:
execution-StepExecutionthe stepExecution used to initializeskipCount.
-
-
Method Details
-
setExitStatus
Set theExitStatusfor this contribution.- Parameters:
status-ExitStatusinstance to be used to set the exit status.
-
getExitStatus
Public getter for the status.- Returns:
- the
ExitStatusfor 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
StepExecutionand thisStepContribution.
-
getSkipCount
public long getSkipCount()- Returns:
- the number of skips collected in this
StepContribution(not including skips accumulated in the parentStepExecution).
-
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 getter for the parent step execution of this contribution.- Returns:
- parent step execution of this contribution
-
toString
-
equals
-
hashCode
public int hashCode()
-