Class CompletionPolicySupport
java.lang.Object
org.springframework.batch.repeat.policy.CompletionPolicySupport
- All Implemented Interfaces:
CompletionPolicy
- Direct Known Subclasses:
DefaultResultCompletionPolicy,TimeoutTerminationPolicy
Very simple base class for
CompletionPolicy implementations.- Author:
- Dave Syer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisComplete(RepeatContext context) Always true.booleanisComplete(RepeatContext context, RepeatStatus result) If exit status is not continuable returntrue, otherwise delegate toisComplete(RepeatContext).start(RepeatContext context) Build a newRepeatContextSupportand return it.voidupdate(RepeatContext context) Increment the context so the counter is up to date.
-
Constructor Details
-
CompletionPolicySupport
public CompletionPolicySupport()
-
-
Method Details
-
isComplete
If exit status is not continuable returntrue, otherwise delegate toisComplete(RepeatContext).- Specified by:
isCompletein interfaceCompletionPolicy- Parameters:
context- the current batch context.result- the result of the latest batch item processing.- Returns:
- true if the batch should terminate.
- See Also:
-
isComplete
Always true.- Specified by:
isCompletein interfaceCompletionPolicy- Parameters:
context- the current batch context.- Returns:
- true if the batch should terminate.
- See Also:
-
start
Build a newRepeatContextSupportand return it.- Specified by:
startin interfaceCompletionPolicy- Parameters:
context- the current context if one is already in progress.- Returns:
- a context object that can be used by the implementation to store internal state for a batch.
- See Also:
-
update
Increment the context so the counter is up to date. Do nothing else.- Specified by:
updatein interfaceCompletionPolicy- Parameters:
context- the value returned by start.- See Also:
-