Class NestedRepeatCallback
java.lang.Object
org.springframework.batch.repeat.callback.NestedRepeatCallback
- All Implemented Interfaces:
RepeatCallback
Callback that delegates to another callback, via a
RepeatOperations
instance.
Useful when nesting or composing batches in one another, e.g. for breaking a batch down
into chunks.- Author:
- Dave Syer, Mahmoud Ben Hassine
-
Constructor Summary
ConstructorDescriptionNestedRepeatCallback
(RepeatOperations template, RepeatCallback callback) Constructor setting mandatory fields. -
Method Summary
Modifier and TypeMethodDescriptiondoInIteration
(RepeatContext context) Simply calls template.execute(callback).
-
Constructor Details
-
NestedRepeatCallback
Constructor setting mandatory fields.- Parameters:
template
- theRepeatOperations
to use when calling the delegate callbackcallback
- theRepeatCallback
delegate
-
-
Method Details
-
doInIteration
Simply calls template.execute(callback). Clients can use this to repeat a batch process, or to break a process up into smaller chunks (e.g. to change the transaction boundaries).- Specified by:
doInIteration
in interfaceRepeatCallback
- Parameters:
context
- the current context passed in by the caller.- Returns:
- an
RepeatStatus
which is continuable if there is (or may be) more data to process. - Throws:
Exception
- if there is a problem with the processing.- See Also:
-