11/*
2- * Copyright 2006-2019 the original author or authors.
2+ * Copyright 2006-2022 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2626import org .springframework .lang .Nullable ;
2727
2828/**
29- * Entry point for browsing executions of running or historical jobs and steps. Since the
30- * data may be re-hydrated from persistent storage, it may not contain volatile fields
29+ * Entry point for browsing the executions of running or historical jobs and steps. Since
30+ * the data may be re-hydrated from persistent storage, it cannot contain volatile fields
3131 * that would have been present when the execution was active.
3232 *
3333 * @author Dave Syer
3939public interface JobExplorer {
4040
4141 /**
42- * Fetch {@link JobInstance} values in descending order of creation (and therefore
43- * usually of first execution).
44- * @param jobName the name of the job to query
45- * @param start the start index of the instances to return
46- * @param count the maximum number of instances to return
47- * @return the {@link JobInstance} values up to a maximum of count values
42+ * Fetch {@link JobInstance} values in descending order of creation (and, therefore,
43+ * usually, of first execution).
44+ * @param jobName The name of the job to query.
45+ * @param start The start index of the instances to return.
46+ * @param count The maximum number of instances to return.
47+ * @return the {@link JobInstance} values up to a maximum of count values.
4848 */
4949 List <JobInstance > getJobInstances (String jobName , int start , int count );
5050
5151 /**
52- * Find the last job instance by Id for the given job.
53- * @param jobName name of the job
54- * @return the last job instance by Id if any or null otherwise
52+ * Find the last job instance, by ID, for the given job.
53+ * @param jobName The name of the job.
54+ * @return the last job instance by Id if any or {@code null} otherwise.
5555 *
5656 * @since 4.2
5757 */
@@ -61,52 +61,53 @@ default JobInstance getLastJobInstance(String jobName) {
6161 }
6262
6363 /**
64- * Retrieve a {@link JobExecution} by its id . The complete object graph for this
65- * execution should be returned (unless otherwise indicated) including the parent
64+ * Retrieve a {@link JobExecution} by its ID . The complete object graph for this
65+ * execution should be returned (unless otherwise indicated), including the parent
6666 * {@link JobInstance} and associated {@link ExecutionContext} and
6767 * {@link StepExecution} instances (also including their execution contexts).
68- * @param executionId the job execution id
69- * @return the {@link JobExecution} with this id, or null if not found
68+ * @param executionId The job execution ID.
69+ * @return the {@link JobExecution} that has this ID or {@code null} if not found.
7070 */
7171 @ Nullable
7272 JobExecution getJobExecution (@ Nullable Long executionId );
7373
7474 /**
75- * Retrieve a {@link StepExecution} by its id and parent {@link JobExecution} id . The
75+ * Retrieve a {@link StepExecution} by its ID and parent {@link JobExecution} ID . The
7676 * execution context for the step should be available in the result, and the parent
77- * job execution should have its primitive properties, but may not contain the job
77+ * job execution should have its primitive properties, but it may not contain the job
7878 * instance information.
79- * @param jobExecutionId the parent job execution id
80- * @param stepExecutionId the step execution id
81- * @return the {@link StepExecution} with this id, or null if not found
79+ * @param jobExecutionId The parent job execution ID.
80+ * @param stepExecutionId The step execution ID.
81+ * @return the {@link StepExecution} that has this ID or {@code null} if not found.
8282 *
8383 * @see #getJobExecution(Long)
8484 */
8585 @ Nullable
8686 StepExecution getStepExecution (@ Nullable Long jobExecutionId , @ Nullable Long stepExecutionId );
8787
8888 /**
89- * @param instanceId {@link Long} id for the jobInstance to obtain.
90- * @return the {@link JobInstance} with this id , or null
89+ * @param instanceId {@link Long} The ID for the {@link jobInstance} to obtain.
90+ * @return the {@code JobInstance} that has this ID , or {@code null} if not found.
9191 */
9292 @ Nullable
9393 JobInstance getJobInstance (@ Nullable Long instanceId );
9494
9595 /**
9696 * Retrieve job executions by their job instance. The corresponding step executions
97- * may not be fully hydrated (e.g. their execution context may be missing), depending
98- * on the implementation. Use {@link #getStepExecution(Long, Long)} to hydrate them in
99- * that case .
100- * @param jobInstance the {@link JobInstance} to query
101- * @return the set of all executions for the specified {@link JobInstance}
97+ * may not be fully hydrated (for example, their execution context may be missing),
98+ * depending on the implementation. In that case, use
99+ * {@link #getStepExecution(Long, Long)} to hydrate them .
100+ * @param jobInstance The {@link JobInstance} to query.
101+ * @return the set of all executions for the specified {@link JobInstance}.
102102 */
103103 List <JobExecution > getJobExecutions (JobInstance jobInstance );
104104
105105 /**
106106 * Find the last {@link JobExecution} that has been created for a given
107107 * {@link JobInstance}.
108- * @param jobInstance the {@link JobInstance}
109- * @return the last {@link JobExecution} that has been created for this instance or
108+ * @param jobInstance The {@code JobInstance} for which to find the last
109+ * {@code JobExecution}.
110+ * @return the last {@code JobExecution} that has been created for this instance or
110111 * {@code null} if no job execution is found for the given job instance.
111112 *
112113 * @since 4.2
@@ -118,39 +119,39 @@ default JobExecution getLastJobExecution(JobInstance jobInstance) {
118119
119120 /**
120121 * Retrieve running job executions. The corresponding step executions may not be fully
121- * hydrated (e.g. their execution context may be missing), depending on the
122- * implementation. Use {@link #getStepExecution(Long, Long)} to hydrate them in that
123- * case .
124- * @param jobName the name of the job
125- * @return the set of running executions for jobs with the specified name
122+ * hydrated (for example, their execution context may be missing), depending on the
123+ * implementation. In that case, use {@link #getStepExecution(Long, Long)} to hydrate
124+ * them .
125+ * @param jobName The name of the job.
126+ * @return the set of running executions for jobs with the specified name.
126127 */
127128 Set <JobExecution > findRunningJobExecutions (@ Nullable String jobName );
128129
129130 /**
130131 * Query the repository for all unique {@link JobInstance} names (sorted
131132 * alphabetically).
132- * @return the set of job names that have been executed
133+ * @return the set of job names that have been executed.
133134 */
134135 List <String > getJobNames ();
135136
136137 /**
137- * Fetch {@link JobInstance} values in descending order of creation (and there for
138- * usually of first execution) with a 'like'/ wildcard criteria.
139- * @param jobName the name of the job to query for .
140- * @param start the start index of the instances to return.
141- * @param count the maximum number of instances to return.
142- * @return a list of {@link JobInstance} for the job name requested .
138+ * Fetch {@link JobInstance} values in descending order of creation (and, therefore,
139+ * usually of first execution) with a 'like' or wildcard criteria.
140+ * @param jobName The name of the job for which to query.
141+ * @param start The start index of the instances to return.
142+ * @param count The maximum number of instances to return.
143+ * @return a list of {@link JobInstance} for the requested job name.
143144 */
144145 List <JobInstance > findJobInstancesByJobName (String jobName , int start , int count );
145146
146147 /**
147- * Query the repository for the number of unique {@link JobInstance}s associated with
148- * the supplied job name.
149- * @param jobName the name of the job to query for
148+ * Query the repository for the number of unique {@link JobInstance} objects
149+ * associated with the supplied job name.
150+ * @param jobName The name of the job for which to query.
150151 * @return the number of {@link JobInstance}s that exist within the associated job
151- * repository
152- * @throws NoSuchJobException thrown when there is no {@link JobInstance} for the
153- * jobName specified.
152+ * repository.
153+ * @throws {@code NoSuchJobException} thrown when there is no {@link JobInstance} for
154+ * the jobName specified.
154155 */
155156 int getJobInstanceCount (@ Nullable String jobName ) throws NoSuchJobException ;
156157
0 commit comments