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 theExitStatus.longPublic getter for the filter counter.longPublic getter for the process skip count.longPublic access to the read counter.longPublic getter for the read skip count.longPublic getter for the parent step execution of this contribution.longlongPublic access to the write counter.longPublic getter for the write skip count.inthashCode()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 contribution.voidincrementReadSkipCount(long count) Increment the read skip count for this contribution.voidincrementWriteCount(long count) Increment the counter for the number of items written.voidIncrement the write skip count for this contribution.voidsetExitStatus(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 theExitStatus.- Returns:
- the
ExitStatusfor this contribution
-
incrementFilterCount
public void incrementFilterCount(long count) Increment the counter for the number of items processed.- Parameters:
count- Thelongamount 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- Thelongamount 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
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- Thelongamount 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 getter for the parent step execution of this contribution.- Returns:
- parent step execution of this contribution
-
toString
-
equals
-
hashCode
public int hashCode()
-