org.springframework.batch.core.launch.support
Class RunIdIncrementer

java.lang.Object
  extended by org.springframework.batch.core.launch.support.RunIdIncrementer
All Implemented Interfaces:
JobParametersIncrementer

public class RunIdIncrementer
extends Object
implements JobParametersIncrementer

Author:
Dave Syer

Constructor Summary
RunIdIncrementer()
           
 
Method Summary
 JobParameters getNext(JobParameters parameters)
          Increment the run.id parameter (starting with 1).
 void setKey(String key)
          The name of the run id in the job parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunIdIncrementer

public RunIdIncrementer()
Method Detail

setKey

public void setKey(String key)
The name of the run id in the job parameters. Defaults to "run.id".

Parameters:
key - the key to set

getNext

public JobParameters getNext(JobParameters parameters)
Increment the run.id parameter (starting with 1).

Specified by:
getNext in interface JobParametersIncrementer
Parameters:
parameters - the last value used
Returns:
the next value to use


Copyright © 2013 SpringSource. All Rights Reserved.