|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.repeat.policy.CompositeCompletionPolicy
public class CompositeCompletionPolicy
Composite policy that loops through a list of delegate policies and answers calls by a concensus.
Nested Class Summary | |
---|---|
protected class |
CompositeCompletionPolicy.CompositeBatchContext
Composite context that knows about the policies and contexts is was created with. |
Constructor Summary | |
---|---|
CompositeCompletionPolicy()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeCompletionPolicy()
Method Detail |
---|
public void setPolicies(CompletionPolicy[] policies)
policies
- public boolean isComplete(RepeatContext context, RepeatStatus result)
isComplete
in interface CompletionPolicy
context
- 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 CompletionPolicy
context
- the current batch context.
CompletionPolicy.isComplete(org.springframework.batch.repeat.RepeatContext)
public RepeatContext start(RepeatContext context)
start
in interface CompletionPolicy
context
- the current context if one is already in progress.
CompletionPolicy.start(RepeatContext)
public void update(RepeatContext context)
update
in interface CompletionPolicy
context
- the value returned by start.CompletionPolicy.update(org.springframework.batch.repeat.RepeatContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |