Class StepExecutionSupport
java.lang.Object
org.duracloud.snapshot.service.impl.StepExecutionSupport
- All Implemented Interfaces:
org.springframework.batch.core.StepExecutionListener,org.springframework.batch.core.StepListener
- Direct Known Subclasses:
ContentPropertiesFileReader,ContentPropertiesWriter,FileSystemReader,ManifestVerifier,SnapshotContentItemVerifier,SnapshotManifestReader,SnapshotRepoManifestReader,SpaceItemWriter,SpaceVerifier,SyncWriter
public abstract class StepExecutionSupport
extends Object
implements org.springframework.batch.core.StepExecutionListener
This class serves as a base class for item readers and writers.
- Author:
- Daniel Bernstein Date: Jul 28, 2015
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddToItemsRead(long value) protected voidAdds the specified value to the existing key.org.springframework.batch.core.ExitStatusafterStep(org.springframework.batch.core.StepExecution stepExecution) voidbeforeStep(org.springframework.batch.core.StepExecution stepExecution) protected voidprotected voidprotected org.springframework.batch.item.ExecutionContextprotected longprotected longgetLongValue(String key) protected org.springframework.batch.core.StepExecutionprotected voidvoidprotected voidSkips the iterator ahead to the items read value stored in the execution context
-
Field Details
-
ITEMS_READ_KEY
-
ERRORS_KEY
- See Also:
-
-
Constructor Details
-
StepExecutionSupport
public StepExecutionSupport()
-
-
Method Details
-
getExecutionContext
protected org.springframework.batch.item.ExecutionContext getExecutionContext() -
addError
-
clearErrors
protected void clearErrors() -
resetContextState
protected void resetContextState() -
getErrors
- Returns:
- a list of errors from the execution context or empty list if there are no errors
-
addToItemsRead
protected void addToItemsRead(long value) -
getItemsRead
protected long getItemsRead() -
skipLinesAlreadyRead
Skips the iterator ahead to the items read value stored in the execution context- Parameters:
it- any iterator
-
beforeStep
public void beforeStep(org.springframework.batch.core.StepExecution stepExecution) - Specified by:
beforeStepin interfaceorg.springframework.batch.core.StepExecutionListener
-
getStepExecution
protected org.springframework.batch.core.StepExecution getStepExecution() -
failExecution
protected void failExecution() -
afterStep
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution) - Specified by:
afterStepin interfaceorg.springframework.batch.core.StepExecutionListener
-
addToLong
Adds the specified value to the existing key.- Parameters:
key-value-
-
getLongValue
-
verifySpace
-
setIsTest
public void setIsTest()
-