34
34
import org .springframework .lang .Nullable ;
35
35
36
36
/**
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.
40
38
*
41
39
* @author Dave Syer
42
40
* @author Mahmoud Ben Hassine
@@ -53,7 +51,11 @@ public interface JobOperator extends JobLauncher {
53
51
* this instance
54
52
* @throws NoSuchJobInstanceException if the {@link JobInstance} associated with the
55
53
* {@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.
56
57
*/
58
+ @ Deprecated (since = "6.0" , forRemoval = true )
57
59
List <Long > getExecutions (long instanceId ) throws NoSuchJobInstanceException ;
58
60
59
61
/**
@@ -65,17 +67,23 @@ public interface JobOperator extends JobLauncher {
65
67
* @return the id values of the {@link JobInstance JobInstances}
66
68
* @throws NoSuchJobException is thrown if no {@link JobInstance}s for the jobName
67
69
* 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.
68
73
*/
74
+ @ Deprecated (since = "6.0" , forRemoval = true )
69
75
List <Long > getJobInstances (String jobName , int start , int count ) throws NoSuchJobException ;
70
76
71
77
/**
72
78
* @param jobName {@link String} name of the job.
73
79
* @param jobParameters {@link JobParameters} parameters for the job instance.
74
80
* @return the {@link JobInstance} with the given name and parameters, or
75
81
* {@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.
78
85
*/
86
+ @ Deprecated (since = "6.0" , forRemoval = true )
79
87
@ Nullable
80
88
default JobInstance getJobInstance (String jobName , JobParameters jobParameters ) {
81
89
throw new UnsupportedOperationException ();
@@ -88,7 +96,11 @@ default JobInstance getJobInstance(String jobName, JobParameters jobParameters)
88
96
* @return the id values of the running {@link JobExecution} instances
89
97
* @throws NoSuchJobException if there are no {@link JobExecution JobExecutions} with
90
98
* 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.
91
102
*/
103
+ @ Deprecated (since = "6.0" , forRemoval = true )
92
104
Set <Long > getRunningExecutions (String jobName ) throws NoSuchJobException ;
93
105
94
106
/**
@@ -98,7 +110,11 @@ default JobInstance getJobInstance(String jobName, JobParameters jobParameters)
98
110
* @return the job parameters that were used to launch the associated instance
99
111
* @throws NoSuchJobExecutionException if the id was not associated with any
100
112
* {@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.
101
116
*/
117
+ @ Deprecated (since = "6.0" , forRemoval = true )
102
118
String getParameters (long executionId ) throws NoSuchJobExecutionException ;
103
119
104
120
/**
@@ -186,7 +202,11 @@ Long startNextInstance(String jobName) throws NoSuchJobException, JobParametersN
186
202
* @return a String summarising the state of the job execution
187
203
* @throws NoSuchJobExecutionException if there is no {@link JobExecution} with the
188
204
* 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.
189
208
*/
209
+ @ Deprecated (since = "6.0" , forRemoval = true )
190
210
String getSummary (long executionId ) throws NoSuchJobExecutionException ;
191
211
192
212
/**
@@ -196,7 +216,11 @@ Long startNextInstance(String jobName) throws NoSuchJobException, JobParametersN
196
216
* @return a map of step execution id to String summarising the state of the execution
197
217
* @throws NoSuchJobExecutionException if there is no {@link JobExecution} with the
198
218
* 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.
199
222
*/
223
+ @ Deprecated (since = "6.0" , forRemoval = true )
200
224
Map <Long , String > getStepExecutionSummaries (long executionId ) throws NoSuchJobExecutionException ;
201
225
202
226
/**
0 commit comments