Skip to main content

%Library.CacheStorage

abstract class %Library.CacheStorage extends %Library.Storage

The %CacheStorage class contains the storage interface methods for the Caché default storage structure. The storage interface methods, which are implemented as method generators, work in conjunction with the persistent interface methods of the %Persistent class to provide persistent behavior for objects.

The methods of %CacheStorage are not meant to be called directly. Use the methods of the %Persistent class which, in turn, call the appropriate %CacheStorage method.

Method Inventory

Parameters

parameter STORAGECOMPILERCLASS = %Compiler.Storage.Cache;
parameter STORAGEINTERFACE = persistent;
STORAGEINTERFACE defines the type of serialization implemented by this class. The value has to match the classtype of the class that is inheriting the serialization interface.

Methods

classmethod %BMEBuilt(ByRef bmeName As %String) as %Boolean
final classmethod %Exists(oid As %ObjectIdentity = "") as %Boolean
%Exists() Check to see if an OID exists in the extent of this class...
final classmethod %ExistsId(id As %String) as %Boolean
%ExistsId() Check to see if an ID exists in the extent of this class...
classmethod %InsertBatch(objects As %List, concurrency As %Integer = 0, useTransactions As %Boolean = 0) as %List
final classmethod %KillExtentData() as %Status
Kill the data, index, and idlocations for extent root classes. Return an error if the class is not the extent root class.
final classmethod %LoadFromMemory(id As %String, ByRef objstate As %String, ByRef obj As %String) as %Status
Load object from persistent storage into memory. The caller is responsible for calling %IdSet() Don't include class name with id in input parameter state is the physical data where the structure of state mirrors the structure of the object on disk obj is an array, subscripted by property name where each array element is equal to the property value named as the subscript.
classmethod %LockExtent(shared As %Boolean = 0) as %Status
Acquire (s)hared or (e)xclusive locks based on locktype parameter
classmethod %LockId(id As %String, shared As %Boolean = 0, timeout As %Integer = $$$LockTimeout) as %Status
%LockId() Obtain an exclusive or shared lock on the object identified by id. The type of lock obtained is determined by shared. This method overrides the implementation from %Library.Persistent.
classmethod %OnDetermineClass(oid As %ObjectIdentity, ByRef class As %String) as %Status
%OnDetermineClass - find the most-specific-type-class for the given OID.
final classmethod %PhysicalAddress(id As %String, ByRef paddr As %String) as %Status
Load object from persistent storage into memory. The caller is responsible for calling %IdSet() Don't include class name with id in input parameter
classmethod %PurgeIndices(idxlist As %List = "", lockExtent As %Boolean = 0, pIgnoreIndexList As %CacheString = "") as %Status
Inherited description: Deletes all entries from each index specified in the idxlist argument. If idxlist is empty then all indices that originate in the class are purged. The index definition remains intact.

If pIgnoreIndexList is defined, it should be a $listbuild of index names that should not be purged. This argument allows you to purge all indices except those defined in pIgnoreIndexList. The default value of this argument is "", which means all indices, or all indices specified in pIndexList, will be purged.

Returns a %Status value indicating success or failure. This method is normally generated by the storage class for persistent classes using %Library.CacheStorage or %Library.CacheSQLStorage. Persistent classes using some other storage class, such as %Library.CustomStorage must override this method.

final classmethod %SaveDirect(ByRef id As %String = "", idList As %List = "", ByRef data As %Binary, concurrency As %Integer = -1) as %Status
%SaveDirect() - saves an object to disk, checks uniqueness and referential integrity constraints, and maintains index structures. This method is implemented by the storage class.
classmethod %SaveIndices(pStartId As %String(MAXLEN="")="", pEndId As %String(MAXLEN="")="", lockExtent As %Boolean = 0) as %Status
Files the indices for all objects whose ID is in the range defined by pStartId and pEndId. If pEndID is null then it defaults to pStartId. If pStartId is null then the range is empty and no filing will occur. If lockExtent is true then an extent lock will be acquired before the indices are built. If the lock cannot be acquired then an error is returned. The lock is released after the index filing is completed.

Returns a %Status value indicating success or failure.

classmethod %SortBegin(idxlist As %List = "", excludeunique As %Integer = 0) as %Status
%SortBegin() This method will start a system merge sort for all indices (idxlist is null) or for specified indices
classmethod %SortEnd(idxlist As %List = "", commit As %Integer = 1, excludeunique As %Integer = 0) as %Status
%SortEnd() This method will end a system merge sort for all indices (idxlist is null) or for specified indices
classmethod %UnlockExtent(shared As %Boolean = 0, immediate As %Boolean = 0) as %Status
Release (s)hared or (e)xclusive locks based on locktype parameter
classmethod %UnlockId(id As %String, shared As %Boolean = 0, immediate As %Boolean = 0) as %Status
%UnlockId() Release an exclusive or shared lock on the object identified by id. The type of lock released is determined by shared.This method overrides the implementation from %Library.Persistent.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab