org.springframework.batch.core.explore
Interface JobExplorer

All Known Implementing Classes:
SimpleJobExplorer

public interface JobExplorer

Entry point for browsing executions of running or historical jobs and steps. Since the data may be re-hydrated from persistent storage, it may not contain volatile fields that would have been present when the execution was active.

Since:
2.0
Author:
Dave Syer

Method Summary
 java.util.Set<JobExecution> findRunningJobExecutions(java.lang.String jobName)
           
 JobExecution getJobExecution(java.lang.Long executionId)
          Retrieve a JobExecution by its id.
 java.util.List<JobExecution> getJobExecutions(JobInstance jobInstance)
           
 JobInstance getJobInstance(java.lang.Long instanceId)
           
 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).
 StepExecution getStepExecution(java.lang.Long jobExecutionId, java.lang.Long stepExecutionId)
          Retrieve a StepExecution by its id and parent JobExecution id.
 

Method Detail

getJobInstances

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).

Parameters:
jobName - the name of the job to query
start - the start index of the instances to return
count - the maximum number of instances to return
Returns:
the JobInstance values up to a maximum of count values

getJobExecution

JobExecution getJobExecution(java.lang.Long executionId)
Retrieve a JobExecution by its id.

Parameters:
executionId - the job execution id
Returns:
the JobExecution with this id, or null if not found

getStepExecution

StepExecution getStepExecution(java.lang.Long jobExecutionId,
                               java.lang.Long stepExecutionId)
Retrieve a StepExecution by its id and parent JobExecution id.

Parameters:
jobExecutionId - the parent job execution id
stepExecutionId - the step execution id
Returns:
the StepExecution with this id, or null if not found

getJobInstance

JobInstance getJobInstance(java.lang.Long instanceId)
Parameters:
instanceId -
Returns:
the JobInstance with this id, or null

getJobExecutions

java.util.List<JobExecution> getJobExecutions(JobInstance jobInstance)
Parameters:
jobInstance - the JobInstance to query
Returns:
the set of all executions for the specified JobInstance

findRunningJobExecutions

java.util.Set<JobExecution> findRunningJobExecutions(java.lang.String jobName)
Parameters:
jobName - the name of the job
Returns:
the set of running executions for jobs with the specified name


Copyright © 2009. All Rights Reserved.