类 SimpleJobExplorer
- java.lang.Object
- org.springframework.batch.core.explore.support.SimpleJobExplorer
- 所有已实现的接口:
JobExplorer
public class SimpleJobExplorer extends java.lang.Object implements JobExplorer
Implementation ofJobExplorer
using the injected DAOs.- 从以下版本开始:
- 2.0
- 作者:
- Dave Syer, Lucas Ward, Michael Minella, Will Schipp, Mahmoud Ben Hassine
- 另请参阅:
JobExplorer
,JobInstanceDao
,JobExecutionDao
,StepExecutionDao
构造器概要
构造器 构造器 说明 SimpleJobExplorer(JobInstanceDao jobInstanceDao, JobExecutionDao jobExecutionDao, StepExecutionDao stepExecutionDao, ExecutionContextDao ecDao)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.util.List<JobInstance>
findJobInstancesByJobName(java.lang.String jobName, int start, int count)
FetchJobInstance
values in descending order of creation (and there for usually of first execution) with a 'like'/wildcard criteria.java.util.Set<JobExecution>
findRunningJobExecutions(java.lang.String jobName)
Retrieve running job executions.JobExecution
getJobExecution(java.lang.Long executionId)
Retrieve aJobExecution
by its id.java.util.List<JobExecution>
getJobExecutions(JobInstance jobInstance)
Retrieve job executions by their job instance.JobInstance
getJobInstance(java.lang.Long instanceId)
int
getJobInstanceCount(java.lang.String jobName)
Query the repository for the number of uniqueJobInstance
s associated with the supplied job name.java.util.List<JobInstance>
getJobInstances(java.lang.String jobName, int start, int count)
FetchJobInstance
values in descending order of creation (and therefore usually of first execution).java.util.List<java.lang.String>
getJobNames()
Query the repository for all uniqueJobInstance
names (sorted alphabetically).StepExecution
getStepExecution(java.lang.Long jobExecutionId, java.lang.Long executionId)
Retrieve aStepExecution
by its id and parentJobExecution
id.
构造器详细资料
SimpleJobExplorer
public SimpleJobExplorer(JobInstanceDao jobInstanceDao, JobExecutionDao jobExecutionDao, StepExecutionDao stepExecutionDao, ExecutionContextDao ecDao)
方法详细资料
getJobExecutions
public java.util.List<JobExecution> getJobExecutions(JobInstance jobInstance)
从接口复制的说明:JobExplorer
Retrieve job executions by their job instance. The corresponding step executions may not be fully hydrated (e.g. their execution context may be missing), depending on the implementation. UseJobExplorer.getStepExecution(Long, Long)
to hydrate them in that case.- 指定者:
getJobExecutions
在接口中JobExplorer
- 参数:
jobInstance
- theJobInstance
to query- 返回:
- the set of all executions for the specified
JobInstance
findRunningJobExecutions
public java.util.Set<JobExecution> findRunningJobExecutions(java.lang.String jobName)
从接口复制的说明:JobExplorer
Retrieve running job executions. The corresponding step executions may not be fully hydrated (e.g. their execution context may be missing), depending on the implementation. UseJobExplorer.getStepExecution(Long, Long)
to hydrate them in that case.- 指定者:
findRunningJobExecutions
在接口中JobExplorer
- 参数:
jobName
- the name of the job- 返回:
- the set of running executions for jobs with the specified name
getJobExecution
public JobExecution getJobExecution(java.lang.Long executionId)
从接口复制的说明:JobExplorer
Retrieve aJobExecution
by its id. The complete object graph for this execution should be returned (unless otherwise indicated) including the parentJobInstance
and associatedExecutionContext
andStepExecution
instances (also including their execution contexts).- 指定者:
getJobExecution
在接口中JobExplorer
- 参数:
executionId
- the job execution id- 返回:
- the
JobExecution
with this id, or null if not found
getStepExecution
public StepExecution getStepExecution(java.lang.Long jobExecutionId, java.lang.Long executionId)
从接口复制的说明:JobExplorer
Retrieve aStepExecution
by its id and parentJobExecution
id. The execution context for the step should be available in the result, and the parent job execution should have its primitive properties, but may not contain the job instance information.- 指定者:
getStepExecution
在接口中JobExplorer
- 参数:
jobExecutionId
- the parent job execution idexecutionId
- the step execution id- 返回:
- the
StepExecution
with this id, or null if not found - 另请参阅:
JobExplorer.getJobExecution(Long)
getJobInstance
public JobInstance getJobInstance(@Nullable java.lang.Long instanceId)
- 指定者:
getJobInstance
在接口中JobExplorer
- 参数:
instanceId
-Long
id for the jobInstance to obtain.- 返回:
- the
JobInstance
with this id, or null
getJobInstances
public java.util.List<JobInstance> getJobInstances(java.lang.String jobName, int start, int count)
从接口复制的说明:JobExplorer
FetchJobInstance
values in descending order of creation (and therefore usually of first execution).- 指定者:
getJobInstances
在接口中JobExplorer
- 参数:
jobName
- the name of the job to querystart
- the start index of the instances to returncount
- the maximum number of instances to return- 返回:
- the
JobInstance
values up to a maximum of count values
getJobNames
public java.util.List<java.lang.String> getJobNames()
从接口复制的说明:JobExplorer
Query the repository for all uniqueJobInstance
names (sorted alphabetically).- 指定者:
getJobNames
在接口中JobExplorer
- 返回:
- the set of job names that have been executed
getJobInstanceCount
public int getJobInstanceCount(@Nullable java.lang.String jobName) throws NoSuchJobException
从接口复制的说明:JobExplorer
Query the repository for the number of uniqueJobInstance
s associated with the supplied job name.- 指定者:
getJobInstanceCount
在接口中JobExplorer
- 参数:
jobName
- the name of the job to query for- 返回:
- the number of
JobInstance
s that exist within the associated job repository - 抛出:
NoSuchJobException
- thrown when there is noJobInstance
for the jobName specified.
findJobInstancesByJobName
public java.util.List<JobInstance> findJobInstancesByJobName(java.lang.String jobName, int start, int count)
从接口复制的说明:JobExplorer
FetchJobInstance
values in descending order of creation (and there for usually of first execution) with a 'like'/wildcard criteria.- 指定者:
findJobInstancesByJobName
在接口中JobExplorer
- 参数:
jobName
- the name of the job to query for.start
- the start index of the instances to return.count
- the maximum number of instances to return.- 返回:
- a list of
JobInstance
for the job name requested.