Class GetArchiveCandidatesRequest
- Namespace
- Excalibur.EventSourcing.Postgres.Requests
- Assembly
- Excalibur.EventSourcing.Postgres.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 = "public", string table = "event_store_events")
Parameters
policyArchivePolicyThe archive policy criteria.
batchSizeintMaximum number of candidates to return.
utcNowDateTimeOffsetThe current UTC time, supplied by the caller's time provider.
cancellationTokenCancellationTokenThe cancellation token.
schemastringThe schema name for the event store table. Default: "public".
tablestringThe event store table name. Default: "event_store_events".