Method RecordRenewal
- Namespace
- MailFathom.Infrastructure.Observability
- Assembly
- MailFathom.Infrastructure.dll
RecordRenewal(WorkScope, bool)
Records an attempt to extend a lease, and stops publishing the scope when the holder had lost it.
public void RecordRenewal(WorkScope scope, bool granted)
Parameters
scopeWorkScopeThe unit of work the renewal asked for.
grantedboolWhether the holder still held the scope.
Remarks
A refused renewal takes the scope out of the gauge here rather than waiting for the holder to act on it, so the two replicas involved never both publish it: the one that took the scope started publishing it when its claim was granted, and this is the moment the one that lost it stops.
Exceptions
- ArgumentNullException
Thrown when
scopeis null.