public class RunIdIncrementer extends java.lang.Object implements JobParametersIncrementer
Long
from the given job parameters. If the parameter does not exist, it will
be initialized to 1. The parameter name can be configured using
setKey(String)
.Constructor and Description |
---|
RunIdIncrementer() |
Modifier and Type | Method and Description |
---|---|
JobParameters |
getNext(JobParameters parameters)
Increment the run.id parameter (starting with 1).
|
void |
setKey(java.lang.String key)
The name of the run id in the job parameters.
|
public void setKey(java.lang.String key)
key
- the key to setpublic JobParameters getNext(@Nullable JobParameters parameters)
getNext
in interface JobParametersIncrementer
parameters
- the previous job parametersjava.lang.IllegalArgumentException
- if the previous value of run.id is invalid