Home > Class Reference > ENSLIB namespace > %SYSTEM.License

%SYSTEM.License

abstract class %SYSTEM.License extends %SYSTEM.Help

The %SYSTEM.License class provides an interface to the Cache License API.

Some class methods are implemented in the special $system object and can be accessed with the $SYSTEM.License.Method() syntax. The system object methods are identified in the method documentation as $SYSTEM.License.XXX.

Example: Set Success=$SYSTEM.License.Login(UserIdentifier)

Other methods are implemented as class methods of the %SYSTEM.License class and can be accessed by the usual ##class(%SYSTEM.License).ClassMethodName() syntax. The special $system object methods can also be accessed in this way.

Example: Do ##class(%SYSTEM.License).ShowSummary()

The %SYSTEM.License class includes a number of license usage reports and queries. The data source is either the local instance or the license server, or in some cases both. The data source is identified in the individual query descriptions.

Comparing data from the license server with data from an individual Cache instance can sometimes lead to apparent inconsistencies. These inconsistencies can be explained by understanding the operation of the license server. Each Cache instance maintains a database of its license use and independently controls connections to itself. When multiple instances share a Cache license key, the license server coordinates the counting of license usage among all instances sharing the license key. Each instance periodically sends messages to the license server describing any changes that have occurred to the local license database since the previous message. Each instance controls logins and logouts locally and can continue to permit connections if communication with the license server should be interrupted. The license server coordinates the activity of the participating instances by preventing them from collectively exceeding the authorized license count.

The periodic nature of license server updates is one source of temporary inconsistency between the license server's view of license use and an individual Cache instance's view. License server and Cache instance counts of license usage will be temporarily out of sync if a number of logins or logouts have not yet been sent to the license server at the time usage reports are requested from the license server and from the local instance. This inconsistency is short lived because updates are sent to the license server about every 15 seconds.

It is also possible for the active license server to be stopped, perhaps because the host on which it is running has shut down or because the instance that started it is being upgraded. In this case, the replacement license server's view of license use will be incomplete until all participating instances have reported their license use.

Method Inventory (Including Private)

Methods (Including Private)

classmethod ActiveServerCount(ByRef Status As %Status) as %Integer
$SYSTEM.License.ActiveServerCount() returns the number of instances (including the current instance) currently using the active license key. It executes the $SYSTEM.License.KeyOrderNumber() query and counts the number of instances using a license with the same OrderNumber value as the active license key on the current instance. Error status is returned by reference in the Status argument.
classmethod ApplicationServerLogin(AppName As %String = "", Keyword As %String = "", ByRef Status As %Status) as %Integer
##Class(%SYSTEM.License).ApplicationServerLogin(AppName, Keyword, Status) returns 1 if the number of instances using the active license key used by this instance (including this instance) does not exceed the number authorized by the "Keyword" item in the "AppName" application license section. Error status is returned by reference in the Status argument.
final classmethod CKEY()
Display the active license key to the current device.
The fields of the [License] section of the installed cache.key file are displayed followed by a brief accounting of license usage, including:
  • License units currently available.
  • Minimum number of license units available at any time since the instance started.
  • Maximum number of license units available.
License usage levels are obtained from the current Cache instance.
This report is identical to those produced by CKEY^%SYS.LICENSE and ^CKEY.
classmethod CSPGrace() as %Integer
$SYSTEM.License.CSPGrace() returns the