public class MapJobExecutionDao extends java.lang.Object implements JobExecutionDao
JobExecutionDao
.Constructor and Description |
---|
MapJobExecutionDao() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.util.List<JobExecution> |
findJobExecutions(JobInstance jobInstance)
Return all
JobExecution s for given JobInstance , sorted
backwards by creation order (so the first element is the most recent). |
java.util.Set<JobExecution> |
findRunningJobExecutions(java.lang.String jobName) |
JobExecution |
getJobExecution(java.lang.Long executionId) |
JobExecution |
getLastJobExecution(JobInstance jobInstance)
Find the last
JobExecution to have been created for a given
JobInstance . |
void |
saveJobExecution(JobExecution jobExecution)
Save a new JobExecution.
|
void |
synchronizeStatus(JobExecution jobExecution)
Because it may be possible that the status of a JobExecution is updated
while running, the following method will synchronize only the status and
version fields.
|
void |
updateJobExecution(JobExecution jobExecution)
Update and existing JobExecution.
|
public void clear()
public void saveJobExecution(JobExecution jobExecution)
JobExecutionDao
saveJobExecution
in interface JobExecutionDao
jobExecution
- JobExecution
instance to be saved.public java.util.List<JobExecution> findJobExecutions(JobInstance jobInstance)
JobExecutionDao
JobExecution
s for given JobInstance
, sorted
backwards by creation order (so the first element is the most recent).findJobExecutions
in interface JobExecutionDao
jobInstance
- parent JobInstance
of the JobExecution
s to find.List
containing JobExecutions for the jobInstance.public void updateJobExecution(JobExecution jobExecution)
JobExecutionDao
updateJobExecution
in interface JobExecutionDao
jobExecution
- JobExecution
instance to be updated.public JobExecution getLastJobExecution(@Nullable JobInstance jobInstance)
JobExecutionDao
JobExecution
to have been created for a given
JobInstance
.getLastJobExecution
in interface JobExecutionDao
jobInstance
- the JobInstance
JobExecution
to execute for this instance or
null
if no job execution is found for the given job instance.public java.util.Set<JobExecution> findRunningJobExecutions(java.lang.String jobName)
findRunningJobExecutions
in interface JobExecutionDao
jobName
- String
containing the name of the job.JobExecution
that are still running (or indeterminate
state), i.e. having null end date, for the specified job name.@Nullable public JobExecution getJobExecution(java.lang.Long executionId)
getJobExecution
in interface JobExecutionDao
executionId
- Long
containing the id of the execution.JobExecution
for given identifier.public void synchronizeStatus(JobExecution jobExecution)
JobExecutionDao
synchronizeStatus
in interface JobExecutionDao
jobExecution
- to be updated.