Table of Contents

Method RecordStateWrittenAsync

Namespace
MailFathom.Application.Synchronization.Restore
Assembly
MailFathom.Application.dll

RecordStateWrittenAsync(IPersistenceSession, MailAccountId, StoredEmailId, CancellationToken)

Records that one message's local state has been written down as mutations for the converger to carry.

Task RecordStateWrittenAsync(IPersistenceSession session, MailAccountId account, StoredEmailId email, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The transaction the stamp commits in, which is the one the records were written in.

account MailAccountId

The account the message is stored for.

email StoredEmailId

The message the walk has reached.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task

A task that completes once the stamp is staged in the session.

Remarks

The stamp and the records are one transaction, because the stamp is the whole of what stops the next pass writing a second set of them. A crash before the commit leaves the message unstamped and the records unwritten, which is the state the pass is already able to start from. It carries no instant: what it records is how far the walk has got, which is the message's own identity and nothing about when.