类 MapJobExecutionDao
- java.lang.Object
- org.springframework.batch.core.repository.dao.MapJobExecutionDao
- 所有已实现的接口:
JobExecutionDao
public class MapJobExecutionDao extends java.lang.Object implements JobExecutionDao
In-memory implementation ofJobExecutionDao
.
构造器概要
构造器 构造器 说明 MapJobExecutionDao()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
clear()
java.util.List<JobExecution>
findJobExecutions(JobInstance jobInstance)
Return allJobExecution
s for givenJobInstance
, 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 lastJobExecution
to have been created for a givenJobInstance
.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.
构造器详细资料
MapJobExecutionDao
public MapJobExecutionDao()
方法详细资料
clear
public void clear()
saveJobExecution
public void saveJobExecution(JobExecution jobExecution)
从接口复制的说明:JobExecutionDao
Save a new JobExecution. Preconditions: jobInstance the jobExecution belongs to must have a jobInstanceId.- 指定者:
saveJobExecution
在接口中JobExecutionDao
- 参数:
jobExecution
-JobExecution
instance to be saved.
findJobExecutions
public java.util.List<JobExecution> findJobExecutions(JobInstance jobInstance)
从接口复制的说明:JobExecutionDao
Return allJobExecution
s for givenJobInstance
, sorted backwards by creation order (so the first element is the most recent).- 指定者:
findJobExecutions
在接口中JobExecutionDao
- 参数:
jobInstance
- parentJobInstance
of theJobExecution
s to find.- 返回:
List
containing JobExecutions for the jobInstance.
updateJobExecution
public void updateJobExecution(JobExecution jobExecution)
从接口复制的说明:JobExecutionDao
Update and existing JobExecution. Preconditions: jobExecution must have an Id (which can be obtained by the save method) and a jobInstanceId.- 指定者:
updateJobExecution
在接口中JobExecutionDao
- 参数:
jobExecution
-JobExecution
instance to be updated.
getLastJobExecution
public JobExecution getLastJobExecution(@Nullable JobInstance jobInstance)
从接口复制的说明:JobExecutionDao
Find the lastJobExecution
to have been created for a givenJobInstance
.- 指定者:
getLastJobExecution
在接口中JobExecutionDao
- 参数:
jobInstance
- theJobInstance
- 返回:
- the last
JobExecution
to execute for this instance ornull
if no job execution is found for the given job instance.
findRunningJobExecutions
public java.util.Set<JobExecution> findRunningJobExecutions(java.lang.String jobName)
- 指定者:
findRunningJobExecutions
在接口中JobExecutionDao
- 参数:
jobName
-String
containing the name of the job.- 返回:
- all
JobExecution
that are still running (or indeterminate state), i.e. having null end date, for the specified job name.
getJobExecution
@Nullable public JobExecution getJobExecution(java.lang.Long executionId)
- 指定者:
getJobExecution
在接口中JobExecutionDao
- 参数:
executionId
-Long
containing the id of the execution.- 返回:
- the
JobExecution
for given identifier.
synchronizeStatus
public void synchronizeStatus(JobExecution jobExecution)
从接口复制的说明:JobExecutionDao
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.- 指定者:
synchronizeStatus
在接口中JobExecutionDao
- 参数:
jobExecution
- to be updated.