Table of Contents

Interface IPostgresCdcStateStore

Namespace
Excalibur.Cdc.Postgres
Assembly
Excalibur.Cdc.Postgres.dll

Defines the contract for managing Postgres CDC position state.

public interface IPostgresCdcStateStore : ICdcStateStore, IAsyncDisposable, IDisposable
Inherited Members

Methods

ClearStateAsync(string, CancellationToken)

Clears all state for a processor.

Task ClearStateAsync(string processorId, CancellationToken cancellationToken)

Parameters

processorId string
cancellationToken CancellationToken

Returns

Task

GetAllStatesAsync(string, CancellationToken)

Gets detailed state information for all tracked tables.

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

Parameters

processorId string
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<PostgresCdcStateEntry>>

GetLastPositionAsync(string, string, CancellationToken)

Gets the last processed LSN position for a processor.

Task<PostgresCdcPosition> GetLastPositionAsync(string processorId, string slotName, CancellationToken cancellationToken)

Parameters

processorId string
slotName string
cancellationToken CancellationToken

Returns

Task<PostgresCdcPosition>

SavePositionAsync(string, string, PostgresCdcPosition, CancellationToken)

Saves the current LSN position for a processor, refusing to move it backwards.

Task<CdcPositionSaveOutcome> SavePositionAsync(string processorId, string slotName, PostgresCdcPosition position, CancellationToken cancellationToken)

Parameters

processorId string
slotName string
position PostgresCdcPosition
cancellationToken CancellationToken

Returns

Task<CdcPositionSaveOutcome>

Advanced when the stored LSN now is position, or RefusedAsStale when the stored LSN was already at or beyond it and nothing was written. The guard makes a regression a no-op, and this is how the caller learns that is what happened.

SaveStateAsync(PostgresCdcStateEntry, CancellationToken)

Saves detailed state for a specific table.

Task SaveStateAsync(PostgresCdcStateEntry entry, CancellationToken cancellationToken)

Parameters

entry PostgresCdcStateEntry
cancellationToken CancellationToken

Returns

Task