Interface IPostgresCdcStateStore
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
processorIdstringcancellationTokenCancellationToken
Returns
GetAllStatesAsync(string, CancellationToken)
Gets detailed state information for all tracked tables.
Task<IReadOnlyList<PostgresCdcStateEntry>> GetAllStatesAsync(string processorId, CancellationToken cancellationToken)
Parameters
processorIdstringcancellationTokenCancellationToken
Returns
GetLastPositionAsync(string, string, CancellationToken)
Gets the last processed LSN position for a processor.
Task<PostgresCdcPosition> GetLastPositionAsync(string processorId, string slotName, CancellationToken cancellationToken)
Parameters
processorIdstringslotNamestringcancellationTokenCancellationToken
Returns
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
processorIdstringslotNamestringpositionPostgresCdcPositioncancellationTokenCancellationToken
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
entryPostgresCdcStateEntrycancellationTokenCancellationToken