Class StepExecutionSimpleCompletionPolicy

java.lang.Object
org.springframework.batch.core.resource.StepExecutionSimpleCompletionPolicy
All Implemented Interfaces:
StepExecutionListener, StepListener, CompletionPolicy

public class StepExecutionSimpleCompletionPolicy extends Object implements StepExecutionListener, CompletionPolicy

A CompletionPolicy that picks up a commit interval from JobParameters by listening to the start of a step. Use anywhere that a CompletionPolicy can be used (usually at the chunk level in a step), and inject as a StepExecutionListener into the surrounding step. N.B. only after the step has started will the completion policy be usable.

It is easier and probably preferable to simply declare the chunk with a commit-interval that is a late-binding expression (e.g. #{jobParameters['commit.interval']}). That feature is available from of Spring Batch 2.1.7.

Author:
Dave Syer, Mahmoud Ben Hassine
See Also: