org.springframework.batch.sample.loop

## Class LimitDecider

- java.lang.Object
- - org.springframework.batch.sample.loop.LimitDecider

- All Implemented Interfaces:
    JobExecutionDecider

      public class LimitDecider
      extends java.lang.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

    Constructors
    Constructor and Description
    `LimitDecider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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` -