org.springframework.batch.sample.loopFlow
Class LimitDecider

java.lang.Object
  extended by org.springframework.batch.sample.loopFlow.LimitDecider
All Implemented Interfaces:
JobExecutionDecider

public class LimitDecider
extends Object
implements JobExecutionDecider

This decider will return "CONTINUE" until the limit it reached, at which point it will return "COMPLETE".

Since:
2.0
Author:
Dan Garrette

Constructor Summary
LimitDecider()
           
 
Method Summary
 FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution)
          Strategy for branching an execution based on the state of an ongoing JobExecution.
 void setLimit(int limit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitDecider

public LimitDecider()
Method Detail

decide

public FlowExecutionStatus decide(JobExecution jobExecution,
                                  StepExecution stepExecution)
Description copied from interface: JobExecutionDecider
Strategy for branching an execution based on the state of an ongoing JobExecution. The return value will be used as a status to determine the next step in the job.

Specified by:
decide in interface JobExecutionDecider
Parameters:
jobExecution - a job execution
stepExecution - the latest step execution (may be null)
Returns:
the exit status code

setLimit

public void setLimit(int limit)
Parameters:
limit -


Copyright © 2009 SpringSource. All Rights Reserved.