public class CompositeCompletionPolicy extends java.lang.Object implements CompletionPolicy
| Modifier and Type | Class and Description |
|---|---|
protected class |
CompositeCompletionPolicy.CompositeBatchContext
Composite context that knows about the policies and contexts is was
created with.
|
| Constructor and Description |
|---|
CompositeCompletionPolicy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isComplete(RepeatContext context)
This policy is complete if any of the composed policies is complete.
|
boolean |
isComplete(RepeatContext context,
RepeatStatus result)
This policy is complete if any of the composed policies is complete.
|
void |
setPolicies(CompletionPolicy[] policies)
Setter for the policies.
|
RepeatContext |
start(RepeatContext context)
Create a new composite context from all the available policies.
|
void |
update(RepeatContext context)
Update all the composed contexts, and also increment the parent context.
|
public void setPolicies(CompletionPolicy[] policies)
policies - an array of completion policies to be used to determine
isComplete(RepeatContext) by consensus.public boolean isComplete(RepeatContext context, RepeatStatus result)
isComplete in interface CompletionPolicycontext - the current batch context.result - the result of the latest batch item processing.CompletionPolicy.isComplete(org.springframework.batch.repeat.RepeatContext,
RepeatStatus)public boolean isComplete(RepeatContext context)
isComplete in interface CompletionPolicycontext - the current batch context.CompletionPolicy.isComplete(org.springframework.batch.repeat.RepeatContext)public RepeatContext start(RepeatContext context)
start in interface CompletionPolicycontext - the current context if one is already in progress.CompletionPolicy.start(RepeatContext)public void update(RepeatContext context)
update in interface CompletionPolicycontext - the value returned by start.CompletionPolicy.update(org.springframework.batch.repeat.RepeatContext)