DocBook|Search
Class Reference
%Library.CacheStorage
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [%SYS] >  [%Library] >  [CacheStorage]
Private  Storage  

abstract class %Library.CacheStorage extends %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.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 23


Summary

Methods
%BMEBuilt %BuildIndices %Exists %ExistsId
%InsertBatch %KillExtentData %LoadFromMemory %LockExtent
%LockId %OnDetermineClass %PhysicalAddress %PurgeIndices
%SaveDirect %SaveIndices %SortBegin %SortEnd
%UnlockExtent %UnlockId


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
• classmethod %BuildIndices(idxlist As %List = "", autoPurge As %Boolean = 0, lockExtent As %Boolean = 0) as %Status
• 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) 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) as %Status
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.

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) 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.