Udostępnij za pośrednictwem


ICheckpointManager Interface

Definition

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 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.

public interface ICheckpointManager
type ICheckpointManager = interface
Public Interface ICheckpointManager

Methods

CheckpointStoreExistsAsync()

Does the checkpoint store exist?

CreateCheckpointIfNotExistsAsync(String)

Create the checkpoint for the given partition if it doesn't exist. Do nothing if it does exist. The offset/sequenceNumber for a freshly-created checkpoint should be set to StartOfStream/0.

CreateCheckpointStoreIfNotExistsAsync()

Create the checkpoint store if it doesn't exist. Do nothing if it does exist.

DeleteCheckpointAsync(String)

Delete the stored checkpoint for the given partition. If there is no stored checkpoint for the given partition, that is treated as success.

GetCheckpointAsync(String)

Get the checkpoint data associated with the given partition. Could return null if no checkpoint has been created for that partition.

UpdateCheckpointAsync(Lease, Checkpoint)

Update the checkpoint in the store with the offset/sequenceNumber in the provided checkpoint.

Applies to