Table of Contents

Interface IMailboxMutationJournal

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

Carries one mutation's durable stage into and out of the session performing it.

public interface IMailboxMutationJournal

Remarks

This is what makes a non-atomic protocol sequence resumable without moving knowledge of that sequence out of the adapter. Which commands a relocation is made of depends on what the connection advertises, and deciding that above the port would put the protocol back into the caller; so the session announces each stage as it passes it, and reads Stage to know where a resumed attempt should continue from.

Every method is durable before it returns. A stage that had only been remembered in memory would be exactly the stage lost to the crash it exists to survive, so an announcement commits on its own rather than joining a transaction the caller holds open across the mail server.

One journal belongs to one mutation and is used by one session at a time.

Properties

Placement

Gets where the destination folder put the email, as far as the record says.

RequiresSourceRemoval

Gets whether the recorded placement left a source occurrence that still has to be removed separately.

Stage

Gets the stage the mutation has durably reached, which a resumed attempt continues from.

Methods

PlacementConfirmedAsync(RemoteEmailPlacement, CancellationToken)

Records that the server acknowledged the placement, and where it said the email landed.

PlacementIssuedAsync(bool, CancellationToken)

Records that the command placing the email in its destination folder is about to be issued.

SourceFlaggedDeletedAsync(CancellationToken)

Records that the source email now carries \Deleted and only the expunge remains.