Floating Features

Similar to Floating Licenses, LicenseSpring supports Floating Features.

In this guide you can find an overview of the floating features functionality: registering and releasing floating features and setting up the Floating Features Watchdog.

Check if a feature is floating

As with floating licenses, you can check if a feature is floating using properties for cloud, as well as offline floating features. To start, use the following code to check if a license feature is floating:

foreach (ILicenseFeature licenseFeature in license.Features())
{
  if(licenseFeature.IsFloating || licenseFeature.IsOfflineFloating)
  {
    // DO SOMETHING WITH A FLOATING FEATURE
  }
}

Floating slots

Developers will want to know the maximum number of users that can simultaneously use a floating feature and the current number of users using the feature. That can be done with:

uint maxUsers = licenseFeature.FloatingSlotsCount;
uint currentUsers = licenseFeature.FloatingSlotsInUse;

Floating timeout

You can get information on the floating feature timeout (in minutes) and the point in time until which a registered feature is valid (time of registration + floating feature timeout). After that time, LicenseSpring server will automatically release the feature - if it's not registered again.

uint floatingTimeout = license.FloatingTimeout;
DateTime floatingEndDateTime = license.FloatingEndDateTime;
DateTime floatingEndDateTimeUtc = license.FloatingEndDateTimeUtc;

Registering and releasing floating features

Similar to floating licenses, floating features have to be periodically registered on the server for them to take up a floating slot.

triangle-exclamation

Likewise, if you wish to release a feature before its timeout, you can do it like so:

triangle-exclamation

Floating feature borrowing

If the license user is planning to be offline for a longer period of time, they can borrow a floating feature instead. Borrowing a feature removes it from the feature watchdog.

For user-based licenses, the application must collect the user's password or initiate an SSO login via their Identity Provider:

Watchdog setup

Similar to a floating license watchdog, floating features have to initialize the watchdog in order to use its functionalities. See: Floating Licensing.

Once configured, floating features only need to be registered once. The watchdog ensures they remain active until they are manually released. Be sure to release them when the application shuts down to free up the slots.

You initialize the watchdog like so:

Setting up the watchdog will also start the thread. If you wish to stop automatically extending your floating features, you can stop the watchdog:

And once stopped, it can be restarted again:

Last updated

Was this helpful?