@@ -59,12 +59,36 @@ public interface JobOperator extends JobLauncher {
59
59
* parameters already exists
60
60
* @throws JobParametersInvalidException thrown if any of the job parameters are
61
61
* invalid.
62
+ * @deprecated since 6.0 in favor of {@link #start(Job, JobParameters)}. Scheduled for
63
+ * removal in 6.2 or later.
62
64
*/
65
+ @ Deprecated (since = "6.0" , forRemoval = true )
63
66
default Long start (String jobName , Properties parameters )
64
67
throws NoSuchJobException , JobInstanceAlreadyExistsException , JobParametersInvalidException {
65
68
throw new UnsupportedOperationException ();
66
69
}
67
70
71
+ /**
72
+ * Start a new instance of a job with the specified parameters.
73
+ * @param job the {@link Job} to start
74
+ * @param jobParameters the {@link JobParameters} to start the job with
75
+ * @return the {@link JobExecution} that was started
76
+ * @throws NoSuchJobException if the given {@link Job} is not registered
77
+ * @throws JobParametersInvalidException thrown if any of the job parameters are
78
+ * @throws JobExecutionAlreadyRunningException if the JobInstance identified by the
79
+ * properties already has an execution running. invalid.
80
+ * @throws JobRestartException if the execution would be a re-start, but a re-start is
81
+ * either not allowed or not needed.
82
+ * @throws JobInstanceAlreadyCompleteException if the job has been run before with the
83
+ * same parameters and completed successfully
84
+ * @throws IllegalArgumentException if the job or job parameters are null.
85
+ */
86
+ default JobExecution start (Job job , JobParameters jobParameters )
87
+ throws NoSuchJobException , JobInstanceAlreadyCompleteException , JobExecutionAlreadyRunningException ,
88
+ JobRestartException , JobParametersInvalidException {
89
+ return run (job , jobParameters );
90
+ }
91
+
68
92
/**
69
93
* Restart a failed or stopped {@link JobExecution}. Fails with an exception if the id
70
94
* provided does not exist or corresponds to a {@link JobInstance} that in normal
0 commit comments