3434import org .springframework .lang .Nullable ;
3535
3636/**
37- * Low level interface for inspecting and controlling jobs with access only to primitive
38- * and collection types. Suitable for a command-line client (e.g. that launches a new
39- * process for each operation), or a remote launcher like a JMX console.
37+ * High level interface for operating batch jobs.
4038 *
4139 * @author Dave Syer
4240 * @author Mahmoud Ben Hassine
@@ -53,7 +51,11 @@ public interface JobOperator extends JobLauncher {
5351 * this instance
5452 * @throws NoSuchJobInstanceException if the {@link JobInstance} associated with the
5553 * {@code instanceId} cannot be found.
54+ * @deprecated Since 6.0 in favor of
55+ * {@link org.springframework.batch.core.repository.JobRepository#getJobExecutions(JobInstance)}.
56+ * Scheduled for removal in 6.2 or later.
5657 */
58+ @ Deprecated (since = "6.0" , forRemoval = true )
5759 List <Long > getExecutions (long instanceId ) throws NoSuchJobInstanceException ;
5860
5961 /**
@@ -65,17 +67,23 @@ public interface JobOperator extends JobLauncher {
6567 * @return the id values of the {@link JobInstance JobInstances}
6668 * @throws NoSuchJobException is thrown if no {@link JobInstance}s for the jobName
6769 * exist.
70+ * @deprecated Since 6.0 in favor of
71+ * {@link org.springframework.batch.core.repository.JobRepository#getJobInstances(String, int, int)}.
72+ * Scheduled for removal in 6.2 or later.
6873 */
74+ @ Deprecated (since = "6.0" , forRemoval = true )
6975 List <Long > getJobInstances (String jobName , int start , int count ) throws NoSuchJobException ;
7076
7177 /**
7278 * @param jobName {@link String} name of the job.
7379 * @param jobParameters {@link JobParameters} parameters for the job instance.
7480 * @return the {@link JobInstance} with the given name and parameters, or
7581 * {@code null}.
76- *
77- * @since 5.0
82+ * @deprecated Since 6.0 in favor of
83+ * {@link org.springframework.batch.core.repository.JobRepository#getJobInstance(String, JobParameters)}.
84+ * Scheduled for removal in 6.2 or later.
7885 */
86+ @ Deprecated (since = "6.0" , forRemoval = true )
7987 @ Nullable
8088 default JobInstance getJobInstance (String jobName , JobParameters jobParameters ) {
8189 throw new UnsupportedOperationException ();
@@ -88,7 +96,11 @@ default JobInstance getJobInstance(String jobName, JobParameters jobParameters)
8896 * @return the id values of the running {@link JobExecution} instances
8997 * @throws NoSuchJobException if there are no {@link JobExecution JobExecutions} with
9098 * that job name
99+ * @deprecated Since 6.0 in favor of
100+ * {@link org.springframework.batch.core.repository.JobRepository#findRunningJobExecutions(String)}.
101+ * Scheduled for removal in 6.2 or later.
91102 */
103+ @ Deprecated (since = "6.0" , forRemoval = true )
92104 Set <Long > getRunningExecutions (String jobName ) throws NoSuchJobException ;
93105
94106 /**
@@ -98,7 +110,11 @@ default JobInstance getJobInstance(String jobName, JobParameters jobParameters)
98110 * @return the job parameters that were used to launch the associated instance
99111 * @throws NoSuchJobExecutionException if the id was not associated with any
100112 * {@link JobExecution}
113+ * @deprecated Since 6.0 in favor of
114+ * {@link org.springframework.batch.core.repository.JobRepository#getJobExecution(Long).getJobParameters()}.
115+ * Scheduled for removal in 6.2 or later.
101116 */
117+ @ Deprecated (since = "6.0" , forRemoval = true )
102118 String getParameters (long executionId ) throws NoSuchJobExecutionException ;
103119
104120 /**
@@ -186,7 +202,11 @@ Long startNextInstance(String jobName) throws NoSuchJobException, JobParametersN
186202 * @return a String summarising the state of the job execution
187203 * @throws NoSuchJobExecutionException if there is no {@link JobExecution} with the
188204 * supplied id
205+ * @deprecated Since 6.0 in favor of
206+ * {@link org.springframework.batch.core.repository.JobRepository#getJobExecution(Long).toString()}.
207+ * Scheduled for removal in 6.2 or later.
189208 */
209+ @ Deprecated (since = "6.0" , forRemoval = true )
190210 String getSummary (long executionId ) throws NoSuchJobExecutionException ;
191211
192212 /**
@@ -196,7 +216,11 @@ Long startNextInstance(String jobName) throws NoSuchJobException, JobParametersN
196216 * @return a map of step execution id to String summarising the state of the execution
197217 * @throws NoSuchJobExecutionException if there is no {@link JobExecution} with the
198218 * supplied id
219+ * @deprecated Since 6.0 in favor of
220+ * {@link org.springframework.batch.core.repository.JobRepository#getJobExecution(Long).getStepExecutions()}.
221+ * Scheduled for removal in 6.2 or later.
199222 */
223+ @ Deprecated (since = "6.0" , forRemoval = true )
200224 Map <Long , String > getStepExecutionSummaries (long executionId ) throws NoSuchJobExecutionException ;
201225
202226 /**
0 commit comments