Class TxnCheckpointSvc
Provides a transaction delivery checkpoint service.
Examples
Please find the transaction checkpoint examples below.
Transaction Checkpoint Example
This Groovy example shows if transaction check point should be performed.
 import com.avoka.tm.svc.TxnCheckpointSvc
 boolean neededCheckpoint = new TxnCheckpointSvc()
                           .doCheckpoint("checkpoint") 
 Transaction Complete Checkpoint Example
This Groovy example shows how to add Completed the delivery checkpoint with the given name, if it does not already exists.
 import com.avoka.tm.svc.TxnCheckpointSvc;
 boolean addedCheckpoint = new TxnCheckpointSvc()
                           .complete("checkpoint") 
 Check for existence of 'Completed' checkpoint Example
This Groovy example shows how to see whether a 'Completed' checkpoint with the specified name already exists for the submission.
 import com.avoka.tm.svc.TxnCheckpointSvc;
 boolean addedCheckpoint = new TxnCheckpointSvc()
                           .complete("checkpoint") - Since:
- 5.0
- 
Constructor SummaryConstructorsConstructorDescriptionTxnCheckpointSvc(Txn txn) Create a transaction delivery checkpoint service for the given transaction.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclearAll()Deletes all existing delivery checkpoints for the configured submission.booleanAdd a Completed the delivery checkpoint with the given name, if it does not already exists.booleanAdd a Completed the delivery checkpoint with the given name, if it does not already exists.booleandoCheckpoint(String name) Return true if the checkpoint should be performed, either hasn't been registered or an error has occurred previously.booleandoCheckpoint(String name, String description) Return true if the checkpoint should be performed, either hasn't been registered or an error has occurred previously.voidAdd a Error the delivery checkpoint with the given name, if it does not already exists.booleanisCompleted(String name) Return whether a 'Completed' checkpoint with the specified name already exists for the submission.
- 
Constructor Details- 
TxnCheckpointSvcCreate a transaction delivery checkpoint service for the given transaction.- Parameters:
- txn- the transaction value object (required)
 
 
- 
- 
Method Details- 
doCheckpointReturn true if the checkpoint should be performed, either hasn't been registered or an error has occurred previously. If the checkpoint has not already been registered this method will create a new checkpoint. - Parameters:
- name- the name of the checkpoint to check, and register if it doesn't exist (required)
- Returns:
- if the checkpoint needs to be performed or false if already completed
 
- 
doCheckpointReturn true if the checkpoint should be performed, either hasn't been registered or an error has occurred previously. If the checkpoint has not already been registered this method will create a new checkpoint. - Parameters:
- name- the name of the checkpoint to check, and register if it doesn't exist (required)
- description- the checkpoint description (optional)
- Returns:
- if the checkpoint needs to be performed or false if already completed
- Since:
- 4.2.0
 
- 
isCompletedReturn whether a 'Completed' checkpoint with the specified name already exists for the submission.- Parameters:
- name- the checkpoint name (required)
- Returns:
- true if the 'Completed' checkpoint already exists
 
- 
completeAdd a Completed the delivery checkpoint with the given name, if it does not already exists.- Parameters:
- name- the checkpoint name (required)
- Returns:
- true if the new completed delivery checkpoint was added or false if the checkpoint was already present
 
- 
completeAdd a Completed the delivery checkpoint with the given name, if it does not already exists.- Parameters:
- name- the checkpoint name (required)
- description- the delivery checkpoint description (optional)
- Returns:
- true if the new completed delivery checkpoint was added or false if the checkpoint was already present
 
- 
errorAdd a Error the delivery checkpoint with the given name, if it does not already exists. If the passed in error object is anThrowableerror it will be logged to the Error Log and associated with the Submission.- Parameters:
- name- the checkpoint name (required)
- error- message the delivery checkpoint error message (optional)
 
- 
clearAllpublic void clearAll()Deletes all existing delivery checkpoints for the configured submission. This method performs a database commit.
 
-