Interface IRetainedContentReleaseStore
- Namespace
- MailFathom.Application.EmailContent.Release
- Assembly
- MailFathom.Application.dll
The database side of the release: what is still retained beside an object, and the freeing of it.
public interface IRetainedContentReleaseStore
Remarks
A payload the move has carried leaves its bytes where they were. The row points at the object and is read from it,
and the bytea column beside it is a retained duplicate held so that a read still works while the endpoint is
being trusted for the first time — which is the one duplicated state
ADR 0017 § 6
admits. This is what ends that state.
Separate from IStoredContentMoveStore although both walk the same five tables, because the two answer opposite questions about a row: the move asks which payloads the database still owns, and this asks which payloads it merely still holds. One contract carrying both would let a caller reach the irreversible half while meaning the reversible one.
No operation here takes a persistence session. Freeing a column is one statement whose own predicate is what makes it safe to issue alone, and nothing else in the release has to commit with it.
Methods
- CountRetainedPayloadsAsync(CancellationToken)
Counts the database copies retained beside payloads the move has already carried.
- ReleaseAsync(EmailContentKind, DateTimeOffset, int, CancellationToken)
Frees a bounded batch of one payload kind's retained copies, leaving every row pointing at its object.