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 Details

  • Constructor Details

    • StepExecutionSupport

      public StepExecutionSupport()
  • Method Details

    • getExecutionContext

      protected org.springframework.batch.item.ExecutionContext getExecutionContext()
    • addError

      protected void addError(String error)
    • clearErrors

      protected void clearErrors()
    • resetContextState

      protected void resetContextState()
    • getErrors

      protected List<String> 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

      protected void skipLinesAlreadyRead(Iterator it)
      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:
      beforeStep in interface org.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:
      afterStep in interface org.springframework.batch.core.StepExecutionListener
    • addToLong

      protected void addToLong(String key, long value)
      Adds the specified value to the existing key.
      Parameters:
      key -
      value -
    • getLongValue

      protected long getLongValue(String key)
    • verifySpace

      protected List<String> verifySpace(SpaceManifestSnapshotManifestVerifier verifier)
    • setIsTest

      public void setIsTest()