using System.Threading; using System.Threading.Tasks; namespace MediaBrowser.Controller.ScheduledTasks; /// /// Provides a distributed leader lease that gates periodic, library-mutating scheduled tasks /// to a single instance across a multi-pod deployment. /// public interface IScanLeaderLease { /// /// Attempts to acquire the scan-leader lease, or renews it when this instance already holds it. /// /// A cancellation token. /// /// true if this instance holds the leader lease and gated periodic tasks may run here; /// otherwise false. /// Task TryAcquireOrRenewAsync(CancellationToken cancellationToken = default); }