Class MailboxMutationPerformer
- Namespace
- MailFathom.Application.Mail.Mutations
- Assembly
- MailFathom.Application.dll
Performs a mutation by writing it down first and then carrying the record as far as the server lets it get.
public sealed class MailboxMutationPerformer : IMailboxMutationPerformer
- Inheritance
-
MailboxMutationPerformer
- Implements
- Inherited Members
Remarks
The order is the whole point. The record is durable before a connection is opened, so a process that dies anywhere in the sequence leaves a statement of what was being attempted and how far it got. What a later run does with that statement is decided here and nowhere else: a completed mutation is answered without touching the server, a mutation whose unrepeatable command was issued and never acknowledged is never issued again, and everything else resumes from the stage the record names.
Which commands a resumed attempt skips is not decided here. That depends on what the connection advertises, which is the write session's business, so the stage travels into it through the journal and the session continues from it.
Constructors
- MailboxMutationPerformer(IMailboxMutationRecordStore, IMailboxWriteSessionFactory, OptimisticConcurrencyRetryPolicy, MailboxMutationOptions)
Initializes the performer from the record store, the write session it acts through, and its attempt bound.
Methods
- PerformAsync(MailboxMutationRequest, MailFolderResolution, MailTransportSecurityPolicy, CancellationToken)
Writes the change down and carries it as far as it can get.