Table of Contents

Interface IMongoDbCdcStateStore

Namespace
Excalibur.Cdc.MongoDB
Assembly
Excalibur.Cdc.MongoDB.dll

Defines the contract for managing MongoDB CDC resume token state.

public interface IMongoDbCdcStateStore : ICdcStateStore, IAsyncDisposable, IDisposable
Inherited Members

Remarks

Extends the shared ICdcStateStore contract with MongoDB-specific strongly-typed resume token accessors.

Methods

ClearStateAsync(string, CancellationToken)

Clears all state for a processor.

Task ClearStateAsync(string processorId, CancellationToken cancellationToken)

Parameters

processorId string

The unique identifier for the processor.

cancellationToken CancellationToken

A token to observe while waiting for the task to complete.

Returns

Task

A task representing the asynchronous operation.

GetAllStatesAsync(string, CancellationToken)

Gets detailed state information for all tracked namespaces.

Task<IReadOnlyList<MongoDbCdcStateEntry>> GetAllStatesAsync(string processorId, CancellationToken cancellationToken)

Parameters

processorId string

The unique identifier for the processor.

cancellationToken CancellationToken

A token to observe while waiting for the task to complete.

Returns

Task<IReadOnlyList<MongoDbCdcStateEntry>>

A collection of state entries.

GetLastPositionAsync(string, CancellationToken)

Gets the last processed resume token position for a processor.

Task<MongoDbCdcPosition> GetLastPositionAsync(string processorId, CancellationToken cancellationToken)

Parameters

processorId string

The unique identifier for the processor.

cancellationToken CancellationToken

A token to observe while waiting for the task to complete.

Returns

Task<MongoDbCdcPosition>

The last processed position, or Start if none exists.

SavePositionAsync(string, MongoDbCdcPosition, CancellationToken)

Saves the current resume token position for a processor.

Task SavePositionAsync(string processorId, MongoDbCdcPosition position, CancellationToken cancellationToken)

Parameters

processorId string

The unique identifier for the processor.

position MongoDbCdcPosition

The position to save.

cancellationToken CancellationToken

A token to observe while waiting for the task to complete.

Returns

Task

A task representing the asynchronous operation.

SaveStateAsync(MongoDbCdcStateEntry, CancellationToken)

Saves detailed state for a specific namespace.

Task SaveStateAsync(MongoDbCdcStateEntry entry, CancellationToken cancellationToken)

Parameters

entry MongoDbCdcStateEntry

The state entry to save.

cancellationToken CancellationToken

A token to observe while waiting for the task to complete.

Returns

Task

A task representing the asynchronous operation.