Table of Contents

Method ReadCandidatesAgainAsync

Namespace
MailFathom.Application.Synchronization.Drain
Assembly
MailFathom.Application.dll

ReadCandidatesAgainAsync(MailAccountId, IReadOnlyCollection<StoredEmailId>, CancellationToken)

Reads the same messages again, as they stand now.

Task<IReadOnlyList<MailboxDrainCandidate>> ReadCandidatesAgainAsync(MailAccountId account, IReadOnlyCollection<StoredEmailId> emails, CancellationToken cancellationToken)

Parameters

account MailAccountId

The account.

emails IReadOnlyCollection<StoredEmailId>

The messages to re-read.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<IReadOnlyList<MailboxDrainCandidate>>

The candidates that are still there and still carry an occurrence, which may be fewer than were asked about.

Remarks

The gate is re-evaluated immediately before a batch is issued rather than only when a message is selected for one, so a row erased, moved, or drained by another replica between the two is judged on what is true when the command goes out. A message this does not return is one the batch drops.