AbstractCheckpointManager Class

If you wish to have EventProcessorHost store checkpoints somewhere other than Azure Storage, you can write your own checkpoint manager using this abstract class.

Inheritance
AbstractCheckpointManager

Constructor

AbstractCheckpointManager()

Methods

create_checkpoint_if_not_exists_async

Create the given partition checkpoint 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.

create_checkpoint_store_if_not_exists_async

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

delete_checkpoint_async

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

get_checkpoint_async

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

update_checkpoint_async

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

create_checkpoint_if_not_exists_async

Create the given partition checkpoint 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.

abstract async create_checkpoint_if_not_exists_async(partition_id)

Parameters

partition_id
str
Required

The ID of a given parition.

Returns

The checkpoint for the given partition, whether newly created or already existing.

Return type

create_checkpoint_store_if_not_exists_async

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

abstract async create_checkpoint_store_if_not_exists_async()

Returns

True if the checkpoint store already exists or was created OK, False if there was a failure.

Return type

delete_checkpoint_async

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

abstract async delete_checkpoint_async(partition_id)

Parameters

partition_id
str
Required

The ID of a given parition.

get_checkpoint_async

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

abstract async get_checkpoint_async(partition_id)

Parameters

partition_id
str
Required

The ID of a given parition.

Returns

Given partition checkpoint info, or None if none has been previously stored.

Return type

update_checkpoint_async

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

abstract async update_checkpoint_async(lease, checkpoint)

Parameters

lease
Lease
Required

The lease to be updated.

checkpoint
Checkpoint
Required

offset/sequeceNumber to update the store with.