类 CompositeCompletionPolicy
- java.lang.Object
- org.springframework.batch.repeat.policy.CompositeCompletionPolicy
- 所有已实现的接口:
CompletionPolicy
public class CompositeCompletionPolicy extends java.lang.Object implements CompletionPolicy
Composite policy that loops through a list of delegate policies and answers calls by a consensus.- 作者:
- Dave Syer
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected classCompositeCompletionPolicy.CompositeBatchContextComposite context that knows about the policies and contexts is was created with.
构造器概要
构造器 构造器 说明 CompositeCompletionPolicy()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanisComplete(RepeatContext context)This policy is complete if any of the composed policies is complete.booleanisComplete(RepeatContext context, RepeatStatus result)This policy is complete if any of the composed policies is complete.voidsetPolicies(CompletionPolicy[] policies)Setter for the policies.RepeatContextstart(RepeatContext context)Create a new composite context from all the available policies.voidupdate(RepeatContext context)Update all the composed contexts, and also increment the parent context.
构造器详细资料
CompositeCompletionPolicy
public CompositeCompletionPolicy()
方法详细资料
setPolicies
public void setPolicies(CompletionPolicy[] policies)
Setter for the policies.- 参数:
policies- an array of completion policies to be used to determineisComplete(RepeatContext)by consensus.
isComplete
public boolean isComplete(RepeatContext context, RepeatStatus result)
This policy is complete if any of the composed policies is complete.- 指定者:
isComplete在接口中CompletionPolicy- 参数:
context- the current batch context.result- the result of the latest batch item processing.- 返回:
- true if the batch should terminate.
- 另请参阅:
CompletionPolicy.isComplete(org.springframework.batch.repeat.RepeatContext, RepeatStatus)
isComplete
public boolean isComplete(RepeatContext context)
This policy is complete if any of the composed policies is complete.- 指定者:
isComplete在接口中CompletionPolicy- 参数:
context- the current batch context.- 返回:
- true if the batch should terminate.
- 另请参阅:
CompletionPolicy.isComplete(org.springframework.batch.repeat.RepeatContext)
start
public RepeatContext start(RepeatContext context)
Create a new composite context from all the available policies.- 指定者:
start在接口中CompletionPolicy- 参数:
context- the current context if one is already in progress.- 返回:
- a context object that can be used by the implementation to store internal state for a batch.
- 另请参阅:
CompletionPolicy.start(RepeatContext)
update
public void update(RepeatContext context)
Update all the composed contexts, and also increment the parent context.- 指定者:
update在接口中CompletionPolicy- 参数:
context- the value returned by start.- 另请参阅:
CompletionPolicy.update(org.springframework.batch.repeat.RepeatContext)