public class CheckpointAlgorithmAdapter extends java.lang.Object implements CompletionPolicy
CheckpointAlgorithm to be used via the rest
 of the framework.CheckpointAlgorithm, 
CompletionPolicy| Constructor and Description | 
|---|
CheckpointAlgorithmAdapter(javax.batch.api.chunk.CheckpointAlgorithm policy)  | 
| Modifier and Type | Method and Description | 
|---|---|
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,
          RepeatStatus 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)
If  
CheckpointAlgorithm.isReadyToCheckpoint() is true
 we will call CheckpointAlgorithm.endCheckpoint() | 
public CheckpointAlgorithmAdapter(javax.batch.api.chunk.CheckpointAlgorithm policy)
public boolean isComplete(RepeatContext context, RepeatStatus result)
CompletionPolicyCompletionPolicy.isComplete(RepeatContext) should also (but not necessarily vice
 versa, since the answer here depends on the result).isComplete in interface CompletionPolicycontext - the current batch context.result - the result of the latest batch item processing.CompletionPolicy.isComplete(RepeatContext)public boolean isComplete(RepeatContext context)
CompletionPolicyisComplete in interface CompletionPolicycontext - the current batch context.public RepeatContext start(RepeatContext parent)
CompletionPolicyRepeatContext to store state in its attributes.start in interface CompletionPolicyparent - the current context if one is already in progress.public void update(RepeatContext context)
CheckpointAlgorithm.isReadyToCheckpoint() is true
 we will call CheckpointAlgorithm.endCheckpoint()update in interface CompletionPolicycontext - a RepeatContext