Class StepExecutionEvent

java.lang.Object
org.springframework.batch.core.Entity
org.springframework.cloud.task.batch.listener.support.StepExecutionEvent
All Implemented Interfaces:
Serializable

public class StepExecutionEvent extends org.springframework.batch.core.Entity
This is a StepExecution DTO created so that a StepExecution can be serialized into Json without having to add mixins to an ObjectMapper.
Author:
Glenn Renfro
See Also:
  • Constructor Details

    • StepExecutionEvent

      public StepExecutionEvent()
    • StepExecutionEvent

      public StepExecutionEvent(org.springframework.batch.core.StepExecution stepExecution)
      Constructor for the StepExecution to initialize the DTO.
      Parameters:
      stepExecution - the StepExecution to build this DTO around.
  • Method Details

    • getExecutionContext

      public org.springframework.batch.item.ExecutionContext getExecutionContext()
      Returns the ExecutionContext for this execution.
      Returns:
      the attributes
    • setExecutionContext

      public void setExecutionContext(org.springframework.batch.item.ExecutionContext executionContext)
      Sets the ExecutionContext for this execution.
      Parameters:
      executionContext - the attributes
    • getCommitCount

      public long getCommitCount()
      Returns the current number of commits for this execution.
      Returns:
      the current number of commits
    • setCommitCount

      public void setCommitCount(int commitCount)
      Sets the current number of commits for this execution.
      Parameters:
      commitCount - the current number of commits
    • getEndTime

      public LocalDateTime getEndTime()
      Returns the time that this execution ended.
      Returns:
      the time that this execution ended
    • setEndTime

      public void setEndTime(LocalDateTime endTime)
      Sets the time that this execution ended.
      Parameters:
      endTime - the time that this execution ended
    • getReadCount

      public long getReadCount()
      Returns the current number of items read for this execution.
      Returns:
      the current number of items read for this execution
    • setReadCount

      public void setReadCount(int readCount)
      Sets the current number of read items for this execution.
      Parameters:
      readCount - the current number of read items for this execution
    • getWriteCount

      public long getWriteCount()
      Returns the current number of items written for this execution.
      Returns:
      the current number of items written for this execution
    • setWriteCount

      public void setWriteCount(int writeCount)
      Sets the current number of written items for this execution.
      Parameters:
      writeCount - the current number of written items for this execution
    • getRollbackCount

      public long getRollbackCount()
      Returns the current number of rollbacks for this execution.
      Returns:
      the current number of rollbacks for this execution
    • setRollbackCount

      public void setRollbackCount(int rollbackCount)
      Setter for number of rollbacks for this execution.
      Parameters:
      rollbackCount - the number of rollbacks for this execution
    • getFilterCount

      public long getFilterCount()
      Returns the current number of items filtered out of this execution.
      Returns:
      the current number of items filtered out of this execution
    • setFilterCount

      public void setFilterCount(int filterCount)
      Public setter for the number of items filtered out of this execution.
      Parameters:
      filterCount - the number of items filtered out of this execution to set
    • getStartTime

      public LocalDateTime getStartTime()
      Gets the time this execution started.
      Returns:
      the time this execution started
    • setStartTime

      public void setStartTime(LocalDateTime startTime)
      Sets the time this execution started.
      Parameters:
      startTime - the time this execution started
    • getStatus

      public org.springframework.batch.core.BatchStatus getStatus()
      Returns the current status of this step.
      Returns:
      the current status of this step
    • setStatus

      public void setStatus(org.springframework.batch.core.BatchStatus status)
      Sets the current status of this step.
      Parameters:
      status - the current status of this step
    • getStepName

      public String getStepName()
      Returns:
      the name of the step.
    • setStepName

      public void setStepName(String stepName)
    • getExitStatus

      public ExitStatus getExitStatus()
      Returns:
      the exitCode
    • setExitStatus

      public void setExitStatus(ExitStatus exitStatus)
      Parameters:
      exitStatus - the ExitStatus for the step.
    • isTerminateOnly

      public boolean isTerminateOnly()
      Returns:
      flag to indicate that an execution should halt
    • setTerminateOnly

      public void setTerminateOnly()
      Set a flag that will signal to an execution environment that this execution (and its surrounding job) wishes to exit.
    • getSkipCount

      public long getSkipCount()
      Returns:
      the total number of items skipped.
    • incrementCommitCount

      public void incrementCommitCount()
      Increment the number of commits.
    • getReadSkipCount

      public long getReadSkipCount()
      Returns:
      the number of records skipped on read.
    • setReadSkipCount

      public void setReadSkipCount(int readSkipCount)
      Set the number of records skipped on read.
      Parameters:
      readSkipCount - the number of records to be skipped on read.
    • getWriteSkipCount

      public long getWriteSkipCount()
      Returns:
      the number of records skipped on write
    • setWriteSkipCount

      public void setWriteSkipCount(int writeSkipCount)
      Set the number of records skipped on write.
      Parameters:
      writeSkipCount - the number of records to be skipped on write.
    • getProcessSkipCount

      public long getProcessSkipCount()
      Returns:
      the number of records skipped during processing
    • setProcessSkipCount

      public void setProcessSkipCount(int processSkipCount)
      Set the number of records skipped during processing.
      Parameters:
      processSkipCount - the number of records skip during processing.
    • getLastUpdated

      public LocalDateTime getLastUpdated()
      Returns:
      the Date representing the last time this execution was persisted.
    • setLastUpdated

      public void setLastUpdated(LocalDateTime lastUpdated)
      Set the time when the StepExecution was last updated before persisting.
      Parameters:
      lastUpdated - the LocalDateTime the StepExecution was last updated.
    • getFailureExceptions

      public List<Throwable> getFailureExceptions()
    • getJobExecutionId

      public long getJobExecutionId()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class org.springframework.batch.core.Entity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.springframework.batch.core.Entity
    • toString

      public String toString()
      Overrides:
      toString in class org.springframework.batch.core.Entity
    • getSummary

      public String getSummary()