Skip to content

StreamCheckpointGrain Methods

Persists a stream queue checkpoint using Orleans grain storage.

Load(CancellationToken)

View source
public ValueTask<string> Load(CancellationToken cancellationToken)
Loads the checkpoint.

Parameters

cancellationTokenCancellationToken
The cancellation token.

Returns

The checkpoint.

Update(string, string, CancellationToken)

View source
public ValueTask<string> Update(string offset, string expectedCheckpoint, CancellationToken cancellationToken)
Updates the checkpoint if the persisted value matches the expected value.

Parameters

offsetstring
The offset.
expectedCheckpointstring
The expected persisted checkpoint.
cancellationTokenCancellationToken
The cancellation token.

Returns

The persisted checkpoint after the update attempt.