Struct RecordedRetentionDeclaration
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
One recorded declaration, with the fact a reader needs about it: whether it has been withdrawn.
public readonly record struct RecordedRetentionDeclaration : IEquatable<RecordedRetentionDeclaration>
- Implements
- Inherited Members
Remarks
THERE ARE THREE STATES PER PAIR AND A CALLER NEEDS ALL THREE. Two live on this record — live and withdrawn — and the third is ABSENCE from the collection, meaning no process in this deployment has ever recorded the pair. Collapsing withdrawn into absent is the defect this type exists to prevent: an instance whose code still declares a withdrawn retention is the mirror of the stale instance, and a caller that cannot see the tombstone cannot detect it at all.
Withdrawal is MONOTONE, so a withdrawn reading is a TERMINAL fact rather than a stale one. The advance path never updates and the withdrawal keeps its first instant, so once this reads true it reads true forever. That is what makes it safe to act on: the reader is not racing anything.
Constructors
RecordedRetentionDeclaration(DeclaredRetentionKey, bool)
One recorded declaration, with the fact a reader needs about it: whether it has been withdrawn.
public RecordedRetentionDeclaration(DeclaredRetentionKey Declaration, bool IsWithdrawn)
Parameters
DeclarationDeclaredRetentionKeyThe (tenant, aggregate type) pair.
IsWithdrawnbooltrue when an administrator has withdrawn this declaration; otherwise false.
Remarks
THERE ARE THREE STATES PER PAIR AND A CALLER NEEDS ALL THREE. Two live on this record — live and withdrawn — and the third is ABSENCE from the collection, meaning no process in this deployment has ever recorded the pair. Collapsing withdrawn into absent is the defect this type exists to prevent: an instance whose code still declares a withdrawn retention is the mirror of the stale instance, and a caller that cannot see the tombstone cannot detect it at all.
Withdrawal is MONOTONE, so a withdrawn reading is a TERMINAL fact rather than a stale one. The advance path never updates and the withdrawal keeps its first instant, so once this reads true it reads true forever. That is what makes it safe to act on: the reader is not racing anything.
Properties
Declaration
The (tenant, aggregate type) pair.
public DeclaredRetentionKey Declaration { get; init; }
Property Value
IsWithdrawn
public bool IsWithdrawn { get; init; }