Skip to main content
Table of Contents

Interface IEventChainRepository

Namespace
Stratara.Abstractions.EventSourcing
Assembly
Stratara.Abstractions.dll

Repository over the event-chain anchor table — periodic global hashes that link the per-stream hash chain into a tamper-evident sequence.

public interface IEventChainRepository
Extension Methods

Methods

AddAnchorAsync(EventChainAnchor, CancellationToken)

Persist a new anchor row. Caller owns the transactional save.

Task AddAnchorAsync(EventChainAnchor anchor, CancellationToken cancellationToken)

Parameters

anchor EventChainAnchor
cancellationToken CancellationToken

Returns

Task

GetLastSequenceNumberOrDefaultAsync(int[], CancellationToken)

Returns the most-recent sequence number that is already covered by an anchor for any of the given bucketIds, or 0 if no anchor exists yet.

Task<long> GetLastSequenceNumberOrDefaultAsync(int[] bucketIds, CancellationToken cancellationToken = default)

Parameters

bucketIds int[]
cancellationToken CancellationToken

Returns

Task<long>