Skip to content

GrainStreamQueueCheckpointer Methods

Persists stream queue checkpoints using Orleans grains.

Create(string, string, string, IClusterClient)

static
View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public static Task<IStreamQueueCheckpointer<string>> Create(string providerName, string partition, string serviceId, IClusterClient clusterClient)
Creates and initializes a grain-based checkpointer with default options.

Parameters

providerNamestring
partitionstring
serviceIdstring
clusterClientIClusterClient

Create(string, string, string, IClusterClient, CancellationToken)

static
View source
public static Task<IStreamQueueCheckpointer<string>> Create(string providerName, string partition, string serviceId, IClusterClient clusterClient, CancellationToken cancellationToken)
Creates and initializes a grain-based checkpointer with default options.

Parameters

providerNamestring
partitionstring
serviceIdstring
clusterClientIClusterClient
cancellationTokenCancellationToken

Create(string, string, string, IClusterClient, GrainStreamQueueCheckpointerOptions)

static
View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public static Task<IStreamQueueCheckpointer<string>> Create(string providerName, string partition, string serviceId, IClusterClient clusterClient, GrainStreamQueueCheckpointerOptions options)
Creates and initializes a grain-based checkpointer.

Parameters

providerNamestring
partitionstring
serviceIdstring
clusterClientIClusterClient
optionsGrainStreamQueueCheckpointerOptions

Create(string, string, string, IClusterClient, GrainStreamQueueCheckpointerOptions, CancellationToken)

static
View source
public static Task<IStreamQueueCheckpointer<string>> Create(string providerName, string partition, string serviceId, IClusterClient clusterClient, GrainStreamQueueCheckpointerOptions options, CancellationToken cancellationToken)
Creates and initializes a grain-based checkpointer.

Parameters

providerNamestring
partitionstring
serviceIdstring
clusterClientIClusterClient
optionsGrainStreamQueueCheckpointerOptions
cancellationTokenCancellationToken

FlushAsync(CancellationToken)

View source
public Task FlushAsync(CancellationToken cancellationToken)
Flushes any pending checkpoint to persistent storage, ensuring the latest offset is durably saved. Called during shutdown or rebalancing to prevent message replay on restart.

Parameters

cancellationTokenCancellationToken
The cancellation token.

Returns

A System.Threading.Tasks.Task representing the flush operation.

Load

View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public Task<string> Load()
Loads the checkpoint.

Returns

The checkpoint.

Load(CancellationToken)

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

Parameters

cancellationTokenCancellationToken
The cancellation token.

Returns

The checkpoint.

Update(string, DateTime)

View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public void Update(string offset, DateTime utcNow)
Updates the checkpoint.

Parameters

offsetstring
The offset.
utcNowDateTime
The current UTC time.

Update(string, DateTime, CancellationToken)

View source
public void Update(string offset, DateTime utcNow, CancellationToken cancellationToken)
Updates the checkpoint.

Parameters

offsetstring
The offset.
utcNowDateTime
The current UTC time.
cancellationTokenCancellationToken
The cancellation token.