Table of Contents

Class MailboxRestorePass

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

Puts a held account's mailbox back onto its source server, message by message, while custody returns to mirroring.

public sealed class MailboxRestorePass
Inheritance
MailboxRestorePass
Inherited Members

Remarks

The other half of the switch. The drain empties a source once MailFathom durably holds each message; this fills it back up, and the account leaves Restoring only once nothing is left to put back. Until then MailFathom is still the truth about the mailbox, so a person reading, moving, or deleting mail on a restoring account sees exactly what they saw while it was held.

Two kinds of work, because a held mailbox is in two states at once. A message the drain reached has no occurrence and is appended back, carrying the flags, the keywords, and the arrival the row recorded. A message the drain never reached still has its occurrence, and what it owes the source is its local state — the move, the read, the star, and the labels somebody gave it while the account was held — which is written down as ordinary mutation records the converger carries under ADR 0007.

The append is the one command of the mode that may never be issued twice, since a second APPEND is a second message in the user's folder rather than a repeat of the first. So a record is written and committed before the command goes out; the placement the source named is written onto it next, and the occurrence is carried onto the message after that. A record carrying a placement is a fully answered append the next pass finishes on its own. A record standing with no placement is an append whose outcome is unknown: it is reported to an operator and never reissued, and it holds the account in its phase until they settle it. See ADR 0034.

Constructors

MailboxRestorePass(IMailAccountCustodyStore, IMailboxRestoreStore, IMailboxDrainStore, IMailboxMutationRecordStore, IEmailContentStore, IMailboxWriteSessionFactory, IMailFolderResolutionStore, IMailTransportSecurityPolicyReader, IMailFolderMappingReader, OptimisticConcurrencyRetryPolicy, MailboxSynchronizationOptions, TimeProvider)

Initializes a new instance of the MailboxRestorePass class.

Methods

ReadStandingAsync(MailAccountId, CancellationToken)

Reads how far one restoring account's mailbox has got back onto its source.

ReadUnansweredAppendsAsync(MailAccountId, CancellationToken)

Reads the appends of one account an operator has still to settle.

RestoreAsync(MailAccountId, CancellationToken)

Takes one bounded pass at putting a restoring account's mailbox back onto its source.