Table of Contents

Interface IEventStoreArchiveScanner

Namespace
Excalibur.EventSourcing
Assembly
Excalibur.EventSourcing.Abstractions.dll

Administrative capability for bounded, resumable archive discovery.

public interface IEventStoreArchiveScanner

Remarks

Resolve from the same captured hot store as archive reads and tombstoning. Restricting decorators must explicitly mediate or deny this capability. A round captures policy values, an age evaluation instant, and a finite stream-membership horizon. Later pages retain those inputs; policy reloads apply to the next round. The horizon bounds stream membership, not event eligibility: retention and safe-prefix selection inspect each selected stream's entire current history. Pages advance over examined streams, including streams with no eligible work. Under continued successful retrieval and valid, stable identities, every stream in the finite round is eventually examined. This does not guarantee successful archival or progress across repeated process restarts.

Methods

ScanArchiveCandidatesAsync(ArchivePolicy, int, ArchiveScanCursor?, CancellationToken)

Examines a bounded page of streams in an archive scan round.

ValueTask<ArchiveScanPage> ScanArchiveCandidatesAsync(ArchivePolicy policy, int scanSize, ArchiveScanCursor? continuation, CancellationToken cancellationToken)

Parameters

policy ArchivePolicy

Policy to copy when starting a round; ignored when continuing a round.

scanSize int

Positive maximum number of stream identities examined.

continuation ArchiveScanCursor

The previous page's continuation, or null to start a round.

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<ArchiveScanPage>

A page whose continuation is nonnull until the round is exhausted, even on empty candidate pages.

Remarks

Foreign, malformed, or unsupported continuations throw; they must not restart a scan or report exhaustion. Consumers retain the previous continuation on fetch failure or cancellation, and accept the next continuation only after attempting every candidate on the page. Individual candidate failures must not prevent that advancement. Retrying a page can repeat candidates.