org.springframework.batch.sample.loopFlow
Class LimitDecider
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitDecider
public LimitDecider()
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 executionstepExecution
- 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.