Table of Contents

Method ReadOutstandingAsync

Namespace
MailFathom.Application.Mail.Mutations
Assembly
MailFathom.Application.dll

ReadOutstandingAsync(MailAccountId, int, CancellationToken)

Reads the mutations of one account that have not completed, with the folder binding each was recorded against.

Task<IReadOnlyList<OutstandingMailboxMutation>> ReadOutstandingAsync(MailAccountId account, int limit, CancellationToken cancellationToken)

Parameters

account MailAccountId

The account whose mutations are read.

limit int

The greatest number of records to return.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<OutstandingMailboxMutation>>

The outstanding records, oldest first, at most limit of them.

Remarks

An abandoned mutation is part of the answer rather than excluded from it. Reaching a terminal failed stage is what stops a change being retried, and it would be worth nothing if it also stopped the change being seen: the operator's question is which changes are in flight and which are stuck, and a mutation nothing will attempt again is the second kind. Only a completed one leaves this answer.

Oldest first, because the answer starts with whatever has been outstanding longest. It is bounded like every other public query, and convergence treats the bound as a page it comes back for rather than as a cut.

A record still inside the hold OpenAsync(IPersistenceSession, MailboxMutationRequest, DateTimeOffset?, MailboxMutationLocalChange, CancellationToken) opened it under is absent from this answer, and it is absent rather than skipped afterwards so that a page is spent on work a pass can actually do. It counts as pending in ReadLifecycleCountsAsync(MailAccountId, CancellationToken) throughout, which is what it is: a change asked for that nothing has started.

Exceptions

ArgumentOutOfRangeException

Thrown when limit is not positive.