Class ContactCollectionBudget
- Namespace
- MailFathom.Application.Contacts.Collection
- Assembly
- MailFathom.Application.dll
Bounds how many contacts one folder synchronization run may record.
public sealed class ContactCollectionBudget
- Inheritance
-
ContactCollectionBudget
- Inherited Members
Remarks
The bound belongs to a run rather than to the book, for the reason the content budget beside it does: what needs pacing is the first synchronization of a mailbox holding years of mail, where every message is new and a book could otherwise gain thousands of people in one pass before anybody had seen one of them. A run that reaches the bound stops recording and leaves the rest for the next run, which reads the same mail's senders again and finds the count they need still standing.
One folder run, exactly as the content budget beside it is bounded, so an account whose configuration maps several folders may reach the ceiling once for each of them in one synchronization cycle. That is the bound the configuration reference states, and pacing a first synchronization is what it is sized against. The claim is interlocked all the same, because a budget that leaked under contention would leak precisely where a book is filling fastest, and an owner reading the ceiling is entitled to it holding.
Constructors
- ContactCollectionBudget(int)
Opens a budget for one synchronization run.
Properties
- Recorded
Gets how many contacts this run has recorded.
Methods
- TryClaim()
Claims room for one contact this run is about to record.