Interface JobExecutionDao
- All Known Implementing Classes:
JdbcJobExecutionDao,MongoJobExecutionDao
public interface JobExecutionDao
Data Access Object for job executions.
- Author:
- Lucas Ward, Robert Kasanicky, Mahmoud Ben Hassine
-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddeleteJobExecution(JobExecution jobExecution) Delete the given job execution.default voiddeleteJobExecutionParameters(JobExecution jobExecution) Delete the parameters associated with the given job execution.findJobExecutions(JobInstance jobInstance) Return allJobExecutions for givenJobInstance, sorted backwards by creation order (so the first element is the most recent).findRunningJobExecutions(String jobName) getJobExecution(Long executionId) getLastJobExecution(JobInstance jobInstance) Find the lastJobExecutionto have been created for a givenJobInstance.voidsaveJobExecution(JobExecution jobExecution) Save a new JobExecution.voidsynchronizeStatus(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.voidupdateJobExecution(JobExecution jobExecution) Update and existing JobExecution.
-
Method Details
-
saveJobExecution
Save a new JobExecution.Preconditions: jobInstance the jobExecution belongs to must have a jobInstanceId.
- Parameters:
jobExecution-JobExecutioninstance to be saved.
-
updateJobExecution
Update and existing JobExecution.Preconditions: jobExecution must have an Id (which can be obtained by the save method) and a jobInstanceId.
- Parameters:
jobExecution-JobExecutioninstance to be updated.
-
findJobExecutions
Return allJobExecutions for givenJobInstance, sorted backwards by creation order (so the first element is the most recent).- Parameters:
jobInstance- parentJobInstanceof theJobExecutions to find.- Returns:
Listcontaining JobExecutions for the jobInstance.
-
getLastJobExecution
Find the lastJobExecutionto have been created for a givenJobInstance.- Parameters:
jobInstance- theJobInstance- Returns:
- the last
JobExecutionto execute for this instance ornullif no job execution is found for the given job instance.
-
findRunningJobExecutions
- Parameters:
jobName-Stringcontaining the name of the job.- Returns:
- all
JobExecutionthat are still running (or indeterminate state), i.e. having null end date, for the specified job name.
-
getJobExecution
- Parameters:
executionId-Longcontaining the id of the execution.- Returns:
- the
JobExecutionfor given identifier.
-
synchronizeStatus
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.- Parameters:
jobExecution- to be updated.
-
deleteJobExecution
Delete the given job execution.- Parameters:
jobExecution- the job execution to delete- Since:
- 5.0
-
deleteJobExecutionParameters
Delete the parameters associated with the given job execution.- Parameters:
jobExecution- the job execution for which job parameters should be deleted- Since:
- 5.0
-