Table of Contents

Interface IUserSettingsDocumentReader

Namespace
MailFathom.Infrastructure.Persistence.Users
Assembly
MailFathom.Infrastructure.dll

Reads one user's persisted record.

public interface IUserSettingsDocumentReader

Remarks

One read answers for one user and never for the deployment. That is the whole of the contract's shape: a user-scoped view is a view of one person's record, so the read is a key lookup rather than a query, and a caller holding several users asks for each rather than being handed a page of other people's documents to filter. The one deployment-wide read is of versions alone, which carries no document and is what tells a replica whose record to ask for.

Methods

ReadAsync(UserId, CancellationToken)

Reads the record of one user.

ReadVersionsAsync(IReadOnlyCollection<UserId>, CancellationToken)

Reads the version the record of each named user stands at, without any record.

ReadVersionsAsync(int, CancellationToken)

Reads the version the record of every user a mail-serving endpoint may serve stands at, without any record.