Table of Contents

Class MailSynchronizationStatusReader

Namespace
MailFathom.Application.Synchronization.Administration
Assembly
MailFathom.Application.dll

Answers, in one read, what this deployment's mail synchronization is doing.

public sealed class MailSynchronizationStatusReader
Inheritance
MailSynchronizationStatusReader
Inherited Members

Remarks

Composed here rather than by whatever surface asks, because the composition is the answer. Configuration says which accounts and folders exist, the ledger says what the running process is doing with them, and the durable checkpoints say how far each folder has actually come — and the reading an operator needs is the one none of the three gives alone: a folder whose last run keeps ending while its progress does not move is stuck, and a folder whose progress has not moved because there is nothing left to fetch is not.

The folder list comes from configuration rather than from the store, so a folder no run has ever reached appears as exactly that instead of being absent. That is the case an operator is most likely to be asking about: an alias that names no advertised folder has stored nothing, and a status surface that answered by omitting it would say nothing about the folder they configured.

The lease table is the fourth source, and it is what makes the answer the deployment's rather than this process's. An account is supervised by exactly one replica, so a replica that holds none of them would otherwise report every mailbox as never run — which is the reading an operator gets today from whichever pod their request reached. What the ledger says is kept for the accounts this replica actually holds, and reported as another replica's business for the rest.

Constructors

MailSynchronizationStatusReader(IDeploymentMailAccountCatalog, IDeploymentMailFolders, MailSynchronizationRunLedger, IMailFolderSynchronizationProgressReader, IAttachmentDerivationCoverageReader, IWorkLeaseStore, ReplicaIdentity, AccessAuthorization)

Initializes a reader over the five sources one status answer is composed from.

Methods

ReadAsync(CancellationToken)

Reads what synchronization is doing across every configured account the caller's scope covers.