Interface IDeploymentMailFolders
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
Answers which folders of every account this deployment serves take part in one thing, as a set a query can be narrowed by.
public interface IDeploymentMailFolders
Remarks
The set-based shape of the decisions IMailFolderParticipationReader and IJunkMailFolderCatalog answer per folder. A walk over stored mail narrows a table and cannot ask one folder at a time, so it reads the whole set once, before it starts, and narrows by that value for the rest of its work. Asking again per message would put a database round trip in front of every row.
Every set is read from the account records themselves rather than from what any one process holds in memory, so the number of accounts a deployment serves is a question of how large the answer is rather than of what every replica must keep. The per-folder answers read the settings their scope was prepared with until #2330 moves them, and a request's settings come from the user this replica holds, so the two agree within one convergence interval of the account's last write committing — at once on the replica that wrote it, and sooner wherever the announcement arrives.
Every set names what is admitted rather than what is withheld, because a set of names cannot exclude a folder nobody named: an account's settings enumerate the folders MailFathom has, so anything outside them is a folder this deployment does not have.
Methods
- ReadAsync(MailFolderSelection, IReadOnlyCollection<MailAccountId>, CancellationToken)
Reads the folders of the named accounts that take part in one thing.
- ReadAsync(MailFolderSelection, CancellationToken)
Reads the folders of every served account that take part in one thing.