|
57 | 57 | * <p> |
58 | 58 | * It should be noted that using any of the methods that don't contain |
59 | 59 | * {@link JobParameters} in their signature, will result in one being created with a |
60 | | - * random number of type {@code long} as a parameter. This will ensure restartability when |
61 | | - * no parameters are provided. |
| 60 | + * random number of type {@code long} as a parameter with the name {@code batch.random}. |
| 61 | + * This will ensure restartability when no parameters are provided. |
62 | 62 | * </p> |
63 | 63 | * |
64 | 64 | * @author Lucas Ward |
@@ -159,16 +159,18 @@ public JobExecution launchJob(JobParameters jobParameters) throws Exception { |
159 | 159 | } |
160 | 160 |
|
161 | 161 | /** |
162 | | - * @return a new JobParameters object containing only a parameter with a random number |
163 | | - * of type {@code long}, to ensure that the job instance will be unique. |
| 162 | + * @return a new {@link JobParameters} object containing only one parameter named |
| 163 | + * {@code batch.random} with a random number of type {@code long}, to ensure that the |
| 164 | + * job instance will be unique. |
164 | 165 | */ |
165 | 166 | public JobParameters getUniqueJobParameters() { |
166 | | - return new JobParameters(Set.of(new JobParameter<>("random", this.secureRandom.nextLong(), Long.class))); |
| 167 | + return new JobParameters(Set.of(new JobParameter<>("batch.random", this.secureRandom.nextLong(), Long.class))); |
167 | 168 | } |
168 | 169 |
|
169 | 170 | /** |
170 | | - * @return a new JobParametersBuilder object containing only a parameter with a random |
171 | | - * number of type {@code long}, to ensure that the job instance will be unique. |
| 171 | + * @return a new {@link JobParameters} object containing only one parameter named |
| 172 | + * {@code batch.random} with a random number of type {@code long}, to ensure that the |
| 173 | + * job instance will be unique. |
172 | 174 | */ |
173 | 175 | public JobParametersBuilder getUniqueJobParametersBuilder() { |
174 | 176 | return new JobParametersBuilder(this.getUniqueJobParameters()); |
|
0 commit comments