Skip to content

IStreamCheckpointStore.Update(string, string, CancellationToken)

Update(string, string, CancellationToken)

abstract
public abstract ValueTask<StreamCheckpointStoreState> Update(string checkpoint, string expectedVersion, CancellationToken cancellationToken)
Updates the checkpoint if expectedVersion matches the persisted version.

Parameters

checkpointstring
The checkpoint to persist.
expectedVersionstring
The expected persisted version.
cancellationTokenCancellationToken
The cancellation token.

Returns

The persisted state after the update attempt. If the expected version did not match, the returned state contains the conflicting persisted checkpoint and version.