Does the checkpoint store exist?
Promisetrue
if it exists, false
if it does not exist.
Creates the checkpoint HOLDERs for the given partitions. Does nothing for any checkpoint HOLDERs that already exist.
The semantics of this are complicated because it is possible to use the same store for both leases and checkpoints (the Azure Storage implementation does so) and it is required to have a lease for every partition but it is not required to have a checkpoint for a partition. It is a valid scenario to never use checkpoints at all, so it is important for the store to distinguish between creating the structure(s) that will hold a checkpoint and actually creating a checkpoint (storing an offset/sequence number pair in the structure).
List of partitions to create checkpoint HOLDERs for.
Promiseundefined
; rejects with an Error
.
Create the checkpoint store if it doesn't exist. Does nothing if it exists.
Promiseundefined
; rejects with an Error
.
Delete the stored checkpoint for the given partition. If there is no stored checkpoint for the given partition, that is treated as success. Deleting the checkpoint HOLDER is allowed but not required; your implementation is free to do whichever is more convenient.
The partitionId to delete the checkpoint from the store.
Promiseundefined
; rejects with an Error
.
Deletes the checkpoint store.
Promiseundefined
; rejects with an Error
.
Gets the checkpoint info associated with the given partition. Could return undefined if no checkpoint has been created for that partition.
The partitionId to get the checkpoint info for.
Promise<CheckpointInfo | undefined> Checkpoint info for the given partition, or undefined if none has been previously stored.
Update the checkpoint in the store with the offset/sequenceNumber in the provided checkpoint.
Partition information against which to perform a checkpoint.
offset/sequeceNumber to update the store with
Promiseundefined
; rejects with an Error
.
Generated using TypeDoc
CheckpointManager If you wish to have EventProcessorHost store checkpoints somewhere other than Azure Storage, you can write your own checkpoint manager using this interface.
The Azure Storage managers use the same storage for both lease and checkpoints, so both the interfaces are implemented by the same class. You are free to do the same thing if you have a unified store for both types of data.
This interface does not specify initialization methods because we have no way of knowing what information your implementation will require.