Table of Contents

Interface IMailboxRestoreStore

Namespace
MailFathom.Application.Synchronization.Restore
Assembly
MailFathom.Application.dll

Reads what a restoring account still owes its source, and records what the restore did about it.

public interface IMailboxRestoreStore

Remarks

The append record is the durable half of this port and the reason it exists at all. An APPEND is the one command the mode issues that is not idempotent, so the record is written before it goes out and deleted once the server has named where the copy went — which is the opposite order from the drain, whose occurrence is cleared last precisely because both of its commands may be issued again.

Every write takes the caller's session, because each is committed beside the change it settles: the occurrence written onto a message and the record deleted from under it are one fact about that message. See ADR 0034.

Methods

ConfirmAppendAsync(IPersistenceSession, MailboxRestoreAppend, EmailOccurrenceId, CancellationToken)

Writes the occurrence the source named onto the message and deletes the record that stood for the append.

CountUnmappedFoldersHoldingMailAsync(MailAccountId, CancellationToken)

Counts the account's local folders that hold mail and correspond to no folder mapping.

ReadCandidatesAsync(MailAccountId, int, CancellationToken)

Reads the oldest messages of a restoring account that its source no longer holds.

ReadConfirmableAppendsAsync(MailAccountId, int, CancellationToken)

Reads the appends of one account the source has answered in full and nothing has yet carried.

ReadStandingAsync(MailAccountId, CancellationToken)

Counts what one restoring account still owes its source.

ReadStateCandidatesAsync(MailAccountId, int, CancellationToken)

Reads the messages of a restoring account whose local state has still to be written onto the occurrence they keep.

ReadUnansweredAppendsAsync(MailAccountId, int, CancellationToken)

Reads the appends of one account whose answer never came back.

RecordPlacementAsync(IPersistenceSession, MailboxRestoreAppendId, ImapUidValidity, ImapUid, CancellationToken)

Writes down the placement the source named, on the record the append was issued under.

RecordStateWrittenAsync(IPersistenceSession, MailAccountId, StoredEmailId, CancellationToken)

Records that one message's local state has been written down as mutations for the converger to carry.

RecordUnrestorableAsync(IPersistenceSession, MailAccountId, MailboxRestoreAppend, DateTimeOffset, CancellationToken)

Writes down that the restore can never put one message back, so it stops being counted as outstanding.

ReleasePlacementAsync(IPersistenceSession, MailboxRestoreAppendId, CancellationToken)

Takes a recorded placement off a record, which is what hands the record to an operator.

SettleAppendAsync(IPersistenceSession, MailAccountId, MailboxRestoreAppendId, bool, DateTimeOffset, CancellationToken)

Records an operator's verdict on one unanswered append.

WriteAppendAsync(IPersistenceSession, MailAccountId, MailboxRestoreAppend, CancellationToken)

Writes down that an append is about to be issued for one message.