Skip to main content

Extent Management

Extent Management

For classes that use the default storage class (%Library.CacheStorageOpens in a new tab), Caché maintains extent definitions and globals that those extents have registered for use with its Extent Manager. The interface to the Extent Manager is through the %ExtentMgr.UtilOpens in a new tab class. This registration process occurs during class compilation. If there are any errors or name conflicts, these cause the compile to fail. For compilation to succeed, resolve the conflicts; this usually involves either changing the name of the index or adding explicit storage locations for the data.

The MANAGEDEXTENT class parameter has a default value of 1; this value causes global name registration and a conflicting use check. A value of 0 specifies that there is neither registration nor conflict checking.

Note:

If an application has multiple classes intentionally sharing a global reference, specify that MANAGEDEXTENT equals 0 for all the relevant classes, if they use default storage. Otherwise, recompilation will generate the error such as

ERROR #5564: Storage reference: '^This.App.Global used in 'User.ClassA.cls' 
is already registered for use by 'User.ClassB.cls'

To delete extent metadata, there are multiple approaches:

  • Use the ##class(%ExtentMgr.Util).DeleteExtentDefinition(extent,extenttype) call, where extent is typically the class name and extenttype is the type of extent (for classes, this is cls, which is also the default value for this argument).

  • Use one of the following calls:

    • $SYSTEM.OBJ.Delete(classname,flags) where classname is the class to delete and flags includes e.

    • $SYSTEM.OBJ.DeletePackage(packagename,flags) where packagename is the class to delete and flags includes e.

    • $SYSTEM.OBJ.DeleteAll(flags) where flags includes e.

    These calls are methods of the %SYSTEM.OBJOpens in a new tab class.

FeedbackOpens in a new tab