Package org.springframework.cloud.task.batch.listener.support

# 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:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StepExecutionEvent()`
  `StepExecutionEvent(org.springframework.batch.core.StepExecution stepExecution)`
  Constructor for the StepExecution to initialize the DTO.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `long`
  `getCommitCount()`
  Returns the current number of commits for this execution.
  `Date`
  `getEndTime()`
  Returns the time that this execution ended.
  `org.springframework.batch.item.ExecutionContext`
  `getExecutionContext()`
  Returns the `ExecutionContext` for this execution.
  `ExitStatus`
  `getExitStatus()`
  `List<Throwable>`
  `getFailureExceptions()`
  `long`
  `getFilterCount()`
  Returns the current number of items filtered out of this execution.
  `long`
  `getJobExecutionId()`
  `Date`
  `getLastUpdated()`
  `long`
  `getProcessSkipCount()`
  `long`
  `getReadCount()`
  Returns the current number of items read for this execution.
  `long`
  `getReadSkipCount()`
  `long`
  `getRollbackCount()`
  Returns the current number of rollbacks for this execution.
  `long`
  `getSkipCount()`
  `Date`
  `getStartTime()`
  Gets the time this execution started.
  `org.springframework.batch.core.BatchStatus`
  `getStatus()`
  Returns the current status of this step.
  `String`
  `getStepName()`
  `String`
  `getSummary()`
  `long`
  `getWriteCount()`
  Returns the current number of items written for this execution.
  `long`
  `getWriteSkipCount()`
  `int`
  `hashCode()`
  `void`
  `incrementCommitCount()`
  Increment the number of commits.
  `boolean`
  `isTerminateOnly()`
  `void`
  `setCommitCount(int commitCount)`
  Sets the current number of commits for this execution.
  `void`
  `setEndTime(Date endTime)`
  Sets the time that this execution ended.
  `void`
  `setExecutionContext(org.springframework.batch.item.ExecutionContext executionContext)`
  Sets the `ExecutionContext` for this execution.
  `void`
  `setExitStatus(ExitStatus exitStatus)`
  `void`
  `setFilterCount(int filterCount)`
  Public setter for the number of items filtered out of this execution.
  `void`
  `setLastUpdated(Date lastUpdated)`
  Set the time when the StepExecution was last updated before persisting.
  `void`
  `setProcessSkipCount(int processSkipCount)`
  Set the number of records skipped during processing.
  `void`
  `setReadCount(int readCount)`
  Sets the current number of read items for this execution.
  `void`
  `setReadSkipCount(int readSkipCount)`
  Set the number of records skipped on read.
  `void`
  `setRollbackCount(int rollbackCount)`
  Setter for number of rollbacks for this execution.
  `void`
  `setStartTime(Date startTime)`
  Sets the time this execution started.
  `void`
  `setStatus(org.springframework.batch.core.BatchStatus status)`
  Sets the current status of this step.
  `void`
  `setStepName(String stepName)`
  `void`
  `setTerminateOnly()`
  Set a flag that will signal to an execution environment that this execution (and its surrounding job) wishes to exit.
  `void`
  `setWriteCount(int writeCount)`
  Sets the current number of written items for this execution.
  `void`
  `setWriteSkipCount(int writeSkipCount)`
  Set the number of records skipped on write.
  `String`
  `toString()`

  ### Methods inherited from class org.springframework.batch.core.Entity

  `getId, getVersion, incrementVersion, setId, setVersion`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## 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 Date getEndTime()
    Returns the time that this execution ended.
    Returns:
      the time that this execution ended

  - ### setEndTime

    public void setEndTime(Date 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 Date getStartTime()
    Gets the time this execution started.
    Returns:
      the time this execution started

  - ### setStartTime

    public void setStartTime(Date 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 Date getLastUpdated()
    Returns:
      the Date representing the last time this execution was persisted.

  - ### setLastUpdated

    public void setLastUpdated(Date lastUpdated)
    Set the time when the StepExecution was last updated before persisting.
    Parameters:
      `lastUpdated` - the `Date` 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()