|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CompletionPolicy
Interface for batch completion policies, to enable batch operations to strategise normal completion conditions. Stateful implementations of batch iterators should only update state using the update method. If you need custom behaviour consider extending an existing implementation or using the composite provided.
Method Summary | |
---|---|
boolean |
isComplete(RepeatContext context)
Allow policy to signal completion according to internal state, without having to wait for the callback to complete. |
boolean |
isComplete(RepeatContext context,
ExitStatus result)
Determine whether a batch is complete given the latest result from the callback. |
RepeatContext |
start(RepeatContext parent)
Create a new context for the execution of a batch. |
void |
update(RepeatContext context)
Give implementations the opportunity to update the state of the current batch. |
Method Detail |
---|
boolean isComplete(RepeatContext context, ExitStatus result)
isComplete(RepeatContext)
should also (but not necessarily vice
versa, since the answer here depends on the result).
context
- the current batch context.result
- the result of the latest batch item processing.
isComplete(RepeatContext)
boolean isComplete(RepeatContext context)
context
- the current batch context.
RepeatContext start(RepeatContext parent)
RepeatContext
to store state in its attributes.
parent
- the current context if one is already in progress.
void update(RepeatContext context)
context
- the value returned by start.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |