Class MailboxExports
- Namespace
- MailFathom.Application.Mail.Export
- Assembly
- MailFathom.Application.dll
Everything an operator does about carrying a mailbox out of this deployment, and none of the work that writes one.
public sealed class MailboxExports
- Inheritance
-
MailboxExports
- Inherited Members
Remarks
Measuring, starting, reading, cancelling, downloading, and deleting. Only the download moves any mail, and even that one hands back a stream the transport copies rather than reading an archive into this process; starting an export records it and enqueues the work, so an operator's terminal neither carries the export nor keeps it alive.
The measurement comes before the job on purpose. An export of a mailbox of years reads every stored payload once, which is the most expensive thing this deployment does to itself, and the figure that says so is answerable in seconds from what the database already records. So nothing starts until the caller has been shown what it would carry and the two configured bounds have admitted it.
Constructors
- MailboxExports(AccessAuthorization, IMailboxExportStore, IMailboxExportReader, IMailboxExportArchiveStore, IMailboxExportAuditor, IJobStore, StoredContentCeiling, MailboxExportSettings, TimeProvider)
Initializes the use case.
Fields
- ObjectStorageSettingName
The configuration key a deployment turns the export on with, which the refusal names.
Methods
- CancelAsync(MailAccountId, MailboxExportId, CancellationToken)
Stops an export that is still being written, and deletes whatever it had produced.
- DeleteAsync(MailAccountId, MailboxExportId, CancellationToken)
Deletes a finished export's archive before its retention period ends.
- FileNameFor(MailboxExport)
Names the file a downloaded archive is offered as, from nothing a folder or a message says.
- ListAsync(MailAccountId, CancellationToken)
Reads the exports this account has, newest first.
- MeasureAsync(MailAccountId, string?, CancellationToken)
Reports what an export of a mailbox, or of one folder of it, would carry — without starting one.
- OpenArchiveAsync(MailAccountId, MailboxExportId, CancellationToken)
Opens a finished export's archive, so the transport can copy it to the caller.
- ReadAsync(MailAccountId, MailboxExportId, CancellationToken)
Reads where one export stands.
- StartAsync(MailAccountId, string?, CancellationToken)
Records an export and queues the work that writes its archive.