public class JobExecutionEvent
extends org.springframework.batch.core.Entity
JobExecution
can be serialized into
Json without having to add mixins to an ObjectMapper.Constructor and Description |
---|
JobExecutionEvent() |
JobExecutionEvent(org.springframework.batch.core.JobExecution original)
Constructor for the StepExecution to initialize the DTO.
|
Modifier and Type | Method and Description |
---|---|
void |
addFailureException(Throwable t)
Add the provided throwable to the failure exception list.
|
List<Throwable> |
getAllFailureExceptions()
Return all failure causing exceptions for this JobExecution, including
step executions.
|
Date |
getCreateTime() |
Date |
getEndTime() |
org.springframework.batch.item.ExecutionContext |
getExecutionContext()
Returns the
ExecutionContext for this execution. |
ExitStatus |
getExitStatus() |
List<Throwable> |
getFailureExceptions() |
String |
getJobConfigurationName() |
Long |
getJobId()
Convenience getter for for the id of the enclosing job.
|
JobInstanceEvent |
getJobInstance() |
JobParametersEvent |
getJobParameters() |
Date |
getLastUpdated()
Get the date representing the last time this JobExecution was updated in
the JobRepository.
|
Date |
getStartTime() |
org.springframework.batch.core.BatchStatus |
getStatus() |
Collection<StepExecutionEvent> |
getStepExecutions()
Accessor for the step executions.
|
void |
setCreateTime(Date createTime) |
void |
setEndTime(Date endTime) |
void |
setExecutionContext(org.springframework.batch.item.ExecutionContext executionContext)
Sets the
ExecutionContext for this execution |
void |
setExitStatus(ExitStatus exitStatus) |
void |
setJobInstance(JobInstanceEvent jobInstance) |
void |
setLastUpdated(Date lastUpdated)
Set the last time this JobExecution was updated.
|
void |
setStartTime(Date startTime) |
void |
setStatus(org.springframework.batch.core.BatchStatus status)
Set the value of the status field.
|
String |
toString() |
void |
upgradeStatus(org.springframework.batch.core.BatchStatus status)
Upgrade the status field if the provided value is greater than the
existing one.
|
public JobExecutionEvent()
public JobExecutionEvent(org.springframework.batch.core.JobExecution original)
original
- the StepExecution to build this DTO around.public JobParametersEvent getJobParameters()
public Date getEndTime()
public void setJobInstance(JobInstanceEvent jobInstance)
public void setEndTime(Date endTime)
public Date getStartTime()
public void setStartTime(Date startTime)
public org.springframework.batch.core.BatchStatus getStatus()
public void setStatus(org.springframework.batch.core.BatchStatus status)
status
- the status to setpublic void upgradeStatus(org.springframework.batch.core.BatchStatus status)
status
- the new status valuepublic Long getJobId()
public void setExitStatus(ExitStatus exitStatus)
exitStatus
- public ExitStatus getExitStatus()
public JobInstanceEvent getJobInstance()
public Collection<StepExecutionEvent> getStepExecutions()
public void setExecutionContext(org.springframework.batch.item.ExecutionContext executionContext)
ExecutionContext
for this executionexecutionContext
- the contextpublic org.springframework.batch.item.ExecutionContext getExecutionContext()
ExecutionContext
for this execution. The content is
expected to be persisted after each step completion (successful or not).public Date getCreateTime()
public void setCreateTime(Date createTime)
createTime
- creation time of this execution.public String getJobConfigurationName()
public Date getLastUpdated()
public void setLastUpdated(Date lastUpdated)
lastUpdated
- public void addFailureException(Throwable t)
t
- public List<Throwable> getAllFailureExceptions()
public String toString()
toString
in class org.springframework.batch.core.Entity
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.