Class MailboxChangeReleaser
- Namespace
- MailFathom.Application.Mail.Mutations.Authoring
- Assembly
- MailFathom.Application.dll
Ends the wait a change was opened under, for a caller that has stopped offering the way back.
public sealed class MailboxChangeReleaser
- Inheritance
-
MailboxChangeReleaser
- Inherited Members
Remarks
A delete a client authors is written down with a window in front of it, so the person who answered the question can still take it back. The window is theirs rather than the deployment's, and it ends in one of two ways: they withdraw the change, which is MailboxChangeWithdrawer, or the notification offering that goes and the client says so — which is this. Saying so is what turns the seconds a person was given into seconds the mailbox actually waited rather than a delay every delete pays whether or not anybody was watching.
Nothing depends on being told. A window elapses on its own, and the record is taken in hand by the account's ordinary pass exactly as if this had been called — so a closed tab, a lost network, or a machine put to sleep costs the mailbox nothing. That is what makes this an optimization of the waiting rather than a step in the delete, and it is why asking twice, or asking after the window has already passed, is the same as asking once.
It carries the grant that authored the change, for the reason the withdrawal routes carry theirs: releasing performs no mailbox change of its own, it only stops one being deferred, so what it needs is authority over the same kind of change. Only deletes are ever held today, which is why the one entry point names them.
Constructors
- MailboxChangeReleaser(AccessAuthorization, MailboxScopeResolver, IMailboxMutationRecordStore, OptimisticConcurrencyRetryPolicy, MailAccountRunSignal)
Initializes the use case over the grant it asks first, the records it releases, and the run that carries them.
Fields
- MaximumRecordsPerCall
The greatest number of records one call may release.
Methods
- ReleaseDeletesAsync(IReadOnlyList<MailboxMutationRecordId>, CancellationToken)
Ends the wait in front of the deletes this caller authored, so the next pass may take each in hand.