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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Public getter for theExitStatus
.long
Public getter for the filter counter.long
Public getter for the process skip count.long
Public access to the read counter.long
Public getter for the read skip count.long
Public getter for the parent step execution of this contribution.long
long
Public access to the write counter.long
Public getter for the write skip count.int
hashCode()
void
incrementFilterCount
(long count) Increment the counter for the number of items processed.void
void
Increment the counter for the number of items read.void
Increment the read skip count for this contribution.void
incrementReadSkipCount
(long count) Increment the read skip count for this contribution.void
incrementWriteCount
(long count) Increment the counter for the number of items written.void
Increment the write skip count for this contribution.void
setExitStatus
(ExitStatus status) Set theExitStatus
for this contribution.toString()
-
Constructor Details
-
StepContribution
- Parameters:
execution
-StepExecution
the stepExecution used to initializeskipCount
.
-
-
Method Details
-
setExitStatus
Set theExitStatus
for this contribution.- Parameters:
status
-ExitStatus
instance to be used to set the exit status.
-
getExitStatus
Public getter for theExitStatus
.- Returns:
- the
ExitStatus
for this contribution
-
incrementFilterCount
public void incrementFilterCount(long count) Increment the counter for the number of items processed.- Parameters:
count
- Thelong
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
- Thelong
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 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
- Thelong
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 getter for the parent step execution of this contribution.- Returns:
- parent step execution of this contribution
-
toString
-
equals
-
hashCode
public int hashCode()
-