LicenseSpring .Net SDK 8.1.0
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
LicenseSpring.ExtendedLicenseWatchdog Class Referencesealed

Background watchdog that refreshes one ILicense and any number of floating features. A single worker thread services every target; an internal min-heap keyed on each target's next-refresh deadline drives the schedule, so one failing target never delays the others. Callers must Stop (or Dispose) the watchdog when finished. More...

Inherits IDisposable.

Public Member Functions

void AddFeatureTarget (string featureCode)
 Start tracking a floating feature. Idempotent for the same code.
 
void AddLicenseTarget ()
 Start tracking the license. Idempotent.
 
void Dispose ()
 Stops the watchdog.
 
 ExtendedLicenseWatchdog (ILicense license, ExtendedLicenseWatchdogCallbacks callbacks, ExtendedLicenseWatchdogOptions options=null)
 Creates a watchdog for the given license.
 
void RemoveFeatureTarget (string featureCode)
 Stop tracking a floating feature. Idempotent.
 
void RemoveLicenseTarget ()
 Stop tracking the license. Idempotent.
 
void RequestCheckNow ()
 Non-blocking. Schedules every current target for immediate refresh.
 
void RequestStop ()
 Non-blocking: requests shutdown. Safe to call from a callback.
 
void Run ()
 Starts the worker thread. No-op if already running.
 
ExtendedLicenseWatchdogTargetSnapshot[] Snapshot ()
 Returns a snapshot of every tracked target's current state.
 
void Stop ()
 Requests shutdown and joins the worker thread.
 

Properties

bool IsActive [get]
 Whether the worker thread is alive and not yet asked to stop.
 

Detailed Description

Background watchdog that refreshes one ILicense and any number of floating features. A single worker thread services every target; an internal min-heap keyed on each target's next-refresh deadline drives the schedule, so one failing target never delays the others. Callers must Stop (or Dispose) the watchdog when finished.

Constructor & Destructor Documentation

◆ ExtendedLicenseWatchdog()

LicenseSpring.ExtendedLicenseWatchdog.ExtendedLicenseWatchdog ( ILicense  license,
ExtendedLicenseWatchdogCallbacks  callbacks,
ExtendedLicenseWatchdogOptions  options = null 
)

Creates a watchdog for the given license.

Parameters
licenseLicense to refresh; must not be null.
callbacksPer-target callbacks; any field may be null.
optionsTunable parameters; null uses defaults.
Exceptions
WatchdogExceptionThrown if license is null.

Member Function Documentation

◆ AddFeatureTarget()

void LicenseSpring.ExtendedLicenseWatchdog.AddFeatureTarget ( string  featureCode)

Start tracking a floating feature. Idempotent for the same code.

Exceptions
WatchdogExceptionThrown if featureCode is null or empty.

The documentation for this class was generated from the following file: