public interface JobExplorer
Modifier and Type | Method and Description |
---|---|
java.util.List<JobInstance> |
findJobInstancesByJobName(java.lang.String jobName,
int start,
int count)
Fetch
JobInstance 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 a
JobExecution 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 unique
JobInstance s
associated with the supplied job name. |
java.util.List<JobInstance> |
getJobInstances(java.lang.String jobName,
int start,
int count)
Fetch
JobInstance values in descending order of creation (and
therefore usually of first execution). |
java.util.List<java.lang.String> |
getJobNames()
Query the repository for all unique
JobInstance names (sorted
alphabetically). |
default JobExecution |
getLastJobExecution(JobInstance jobInstance)
Find the last
JobExecution that has been created for a given
JobInstance . |
default JobInstance |
getLastJobInstance(java.lang.String jobName)
Find the last job instance by Id for the given job.
|
StepExecution |
getStepExecution(java.lang.Long jobExecutionId,
java.lang.Long stepExecutionId)
Retrieve a
StepExecution by its id and parent
JobExecution id. |
java.util.List<JobInstance> getJobInstances(java.lang.String jobName, int start, int count)
JobInstance
values in descending order of creation (and
therefore usually of first execution).jobName
- the name of the job to querystart
- the start index of the instances to returncount
- the maximum number of instances to returnJobInstance
values up to a maximum of count values@Nullable default JobInstance getLastJobInstance(java.lang.String jobName)
jobName
- name of the job@Nullable JobExecution getJobExecution(@Nullable java.lang.Long executionId)
JobExecution
by its id. The complete object graph for
this execution should be returned (unless otherwise indicated) including
the parent JobInstance
and associated ExecutionContext
and StepExecution
instances (also including their execution
contexts).executionId
- the job execution idJobExecution
with this id, or null if not found@Nullable StepExecution getStepExecution(@Nullable java.lang.Long jobExecutionId, @Nullable java.lang.Long stepExecutionId)
StepExecution
by its id and parent
JobExecution
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.jobExecutionId
- the parent job execution idstepExecutionId
- the step execution idStepExecution
with this id, or null if not foundgetJobExecution(Long)
@Nullable JobInstance getJobInstance(@Nullable java.lang.Long instanceId)
instanceId
- Long
id for the jobInstance to obtain.JobInstance
with this id, or nulljava.util.List<JobExecution> getJobExecutions(JobInstance jobInstance)
getStepExecution(Long, Long)
to hydrate them in that case.jobInstance
- the JobInstance
to queryJobInstance
@Nullable default JobExecution getLastJobExecution(JobInstance jobInstance)
JobExecution
that has been created for a given
JobInstance
.jobInstance
- the JobInstance
JobExecution
that has been created for this instance or
null
if no job execution is found for the given job instance.java.util.Set<JobExecution> findRunningJobExecutions(@Nullable java.lang.String jobName)
getStepExecution(Long, Long)
to hydrate them in that case.jobName
- the name of the jobjava.util.List<java.lang.String> getJobNames()
JobInstance
names (sorted
alphabetically).java.util.List<JobInstance> findJobInstancesByJobName(java.lang.String jobName, int start, int count)
JobInstance
values in descending order of creation (and
there for usually of first execution) with a 'like'/wildcard criteria.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.JobInstance
for the job name requested.int getJobInstanceCount(@Nullable java.lang.String jobName) throws NoSuchJobException
JobInstance
s
associated with the supplied job name.jobName
- the name of the job to query forJobInstance
s that exist within the
associated job repositoryNoSuchJobException
- thrown when there is no JobInstance
for the jobName specified.