|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.Entity org.springframework.batch.core.JobExecution
public class JobExecution
Batch domain object representing the execution of a job.
Constructor Summary | |
---|---|
JobExecution(JobInstance job)
Constructor for transient (unsaved) instances. |
|
JobExecution(JobInstance job,
Long id)
Because a JobExecution isn't valid unless the job is set, this constructor is the only valid one from a modelling point of view. |
Method Summary | |
---|---|
StepExecution |
createStepExecution(Step step)
Register a step execution with the current job execution. |
Date |
getCreateTime()
|
Date |
getEndTime()
|
ExecutionContext |
getExecutionContext()
Returns the ExecutionContext for this execution |
ExitStatus |
getExitStatus()
|
Long |
getJobId()
Convenience getter for for the id of the enclosing job. |
JobInstance |
getJobInstance()
|
Date |
getStartTime()
|
BatchStatus |
getStatus()
|
Collection |
getStepExecutions()
Accessor for the step executions. |
boolean |
isRunning()
Test if this JobExecution indicates that it is running. |
boolean |
isStopping()
Test if this JobExecution indicates that it has been signalled to
stop. |
void |
setCreateTime(Date createTime)
|
void |
setEndTime(Date endTime)
|
void |
setExecutionContext(ExecutionContext executionContext)
Sets the ExecutionContext for this execution |
void |
setExitStatus(ExitStatus exitStatus)
|
void |
setStartTime(Date startTime)
|
void |
setStatus(BatchStatus status)
|
void |
stop()
Signal the JobExecution to stop. |
String |
toString()
|
Methods inherited from class org.springframework.batch.core.Entity |
---|
equals, getId, getVersion, hashCode, incrementVersion, setId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JobExecution(JobInstance job, Long id)
job
- the job of which this execution is a partpublic JobExecution(JobInstance job)
job
- the enclosing JobInstance
Method Detail |
---|
public Date getEndTime()
public void setEndTime(Date endTime)
public Date getStartTime()
public void setStartTime(Date startTime)
public BatchStatus getStatus()
public void setStatus(BatchStatus status)
public Long getJobId()
public void setExitStatus(ExitStatus exitStatus)
exitStatus
- public ExitStatus getExitStatus()
public JobInstance getJobInstance()
public Collection getStepExecutions()
public StepExecution createStepExecution(Step step)
public String toString()
toString
in class Entity
public boolean isRunning()
JobExecution
indicates that it is running. It should
be noted that this does not necessarily mean that it has been persisted
as such yet.
public boolean isStopping()
JobExecution
indicates that it has been signalled to
stop.
BatchStatus.STOPPING
public void stop()
JobExecution
to stop. Iterates through the associated
StepExecution
s, calling StepExecution.setTerminateOnly()
.
public void setExecutionContext(ExecutionContext executionContext)
ExecutionContext
for this execution
executionContext
- the contextpublic ExecutionContext getExecutionContext()
ExecutionContext
for this execution
public Date getCreateTime()
public void setCreateTime(Date createTime)
createTime
- creation time of this execution.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |