Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

%ZHSLIB.PackageManager.Core.Singleton

abstract class %ZHSLIB.PackageManager.Core.Singleton extends %Library.RegisteredObject

General class to extend to add a "singleton" interface to any registered or persistent class. For persistent classes, requires that the class has a unique index defined on a read-only property with an InitialExpression.

Method Inventory

Parameters

parameter NAMESPACESCOPE = 0;
If set to 1, calls to %Get must return an instance of this class created in the current namespace; a new instance will be created if none exists.
parameter PPG = ^||%ZHSLIB.Singleton;
PPG in which to track references to the instance of this class

Methods

final classmethod %Get(Output pSC As %Status) as %ZHSLIB.PackageManager.Core.Singleton
Return the single per-process/namespace instance of this class, or create a new one. For persistent classes, may open the existing single record by its unique index.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab