Table of Contents

Interface IMailboxDrainStore

Namespace
MailFathom.Application.Synchronization.Drain
Assembly
MailFathom.Application.dll

Reads what a held account still has on its source, and records what the drain did about it.

public interface IMailboxDrainStore

Remarks

The occurrence columns on the stored row are the drain's own durable record, which is why nothing here writes an intent before a command: both drain commands are idempotent against the UIDs they name, so a process that died between issuing one and seeing it answered leaves the occurrence standing and the next pass issues it again. Clearing the occurrence is therefore the last step rather than the first, and synchronization meeting that UID in between recognizes the row it already has rather than storing the message twice.

Methods

ClearOccurrencesAsync(IPersistenceSession, MailAccountId, IReadOnlyCollection<StoredEmailId>, CancellationToken)

Clears the occurrence of every message whose expunge the source has answered.

DeleteSourceRemovalsAsync(IPersistenceSession, IReadOnlyCollection<MailboxSourceRemovalId>, CancellationToken)

Deletes the source removal records whose expunge the source has answered.

ReadCandidatesAgainAsync(MailAccountId, IReadOnlyCollection<StoredEmailId>, CancellationToken)

Reads the same messages again, as they stand now.

ReadCandidatesAsync(MailAccountId, IReadOnlyCollection<MailFolderAlias>, int, CancellationToken)

Reads the oldest messages of a held account that its source still holds.

ReadSourceRemovalsAsync(MailAccountId, IReadOnlyCollection<MailFolderAlias>, int, CancellationToken)

Reads the messages erased before the drain reached them, whose source copy still has to go.

ReadStandingAsync(MailAccountId, CancellationToken)

Counts what one held account's source still holds, and what the gate is keeping there.

RecordContentVerifiedAsync(IPersistenceSession, StoredEmailId, DateTimeOffset, CancellationToken)

Records that a message's stored payload was read back and matched what the row records.