Table of Contents

Class GetArchiveCandidatesRequest

Namespace
Excalibur.EventSourcing.SqlServer.Requests
Assembly
Excalibur.EventSourcing.SqlServer.dll

Data request that discovers aggregates with events eligible for archival to cold storage.

[NoTenantTerm(TenantConfinement.EstateWide, "the archive scan is cross-tenant by design: one archiver serves every tenant, and the projection carries the tenant term so each candidate's owning partition is re-established before it is archived. Scoping this scan to the ambient tenant would leave every other tenant's events unarchived")]
public sealed class GetArchiveCandidatesRequest : DataRequestBase<IDbConnection, IReadOnlyList<ArchiveCandidate>>, IDataRequest<IDbConnection, IReadOnlyList<ArchiveCandidate>>, IDataRequest
Inheritance
GetArchiveCandidatesRequest
Implements
Inherited Members

Remarks

Unlike every other request against this table, this query is deliberately not partitioned by tenant: the archive service runs as a background pass over all tenants, so scoping the enumeration would stall archival for every tenant except one. Isolation is preserved on the other two legs instead — the tenant is projected here and carried on each candidate, then supplied explicitly to the cold write and the hot delete, both of which are tenant-addressed.

Constructors

GetArchiveCandidatesRequest(ArchivePolicy, int, DateTimeOffset, CancellationToken, string, string)

Initializes a new instance of the GetArchiveCandidatesRequest class.

public GetArchiveCandidatesRequest(ArchivePolicy policy, int batchSize, DateTimeOffset utcNow, CancellationToken cancellationToken, string schema = "dbo", string table = "EventStoreEvents")

Parameters

policy ArchivePolicy

The archive policy criteria.

batchSize int

Maximum number of candidates to return.

utcNow DateTimeOffset

The current UTC time, supplied by the caller's time provider.

cancellationToken CancellationToken

The cancellation token.

schema string

The schema name for the event store table. Default: "dbo".

table string

The event store table name. Default: "EventStoreEvents".