Physical Storage Base Class. More...
Public Member Functions | |
_.Library.Status | LoadData (_.Library.String id) |
LoadData() - loads an object from storage. More... | |
_.Library.Status | SaveData (_.Library.String id) |
SaveData() - saves an object to disk, checks uniqueness and referential More... | |
Static Public Member Functions | |
_.Library.Status | DeleteData (_.Library.String id, _.Library.Integer concurrency) |
This method is normally generated by the storage class for persistent classes using. More... | |
_.Library.Status | KillExtentData (_.Library.Boolean killstreams) |
KillExtentData() - kills extent data in storage. More... | |
Static Public Attributes | |
IDTYPE = None | |
Physical Storage Base Class. | |
STORAGEINTERFACE = None | |
STORAGEINTERFACE defines the type of serialization implemented by this class. More... | |
Static Private Member Functions | |
_.Library.Status | BuildIndices (_.Library.RawString pIndexList, _.Library.Integer pAutoPurge, _.Library.Integer pLockFlag, _.Library.Integer pJournalFlag, _.Library.RawString pStartID, _.Library.RawString pEndID, _.Library.RawString pIgnoreIndexList) |
_.Library.Status | PurgeIndices (_.Library.List idxlist, _.Library.Boolean lockExtent, _.Library.RawString pIgnoreIndexList) |
Deletes all entries from each index specified in the idxlist argument. More... | |
_.Library.Status | ValidateIndices (_.Library.List idxList, _.Library.Boolean autoCorrect, _.Library.Integer lockOption, _.Library.Boolean multiProcess, _.Library.String mapList, _.Library.Boolean verbose, _.Library.String errors) |
ValidateIndices() - Validates indices for a class More... | |
_.Library.Status | ValidateTable (_.Library.Integer lockOption, _.Library.Boolean multiProcess, _.Library.Boolean verbose, _.Library.String errors) |
ValidateTable() - Validates a table's data More... | |
|
staticprivate |
Builds entries for each index specified in the idxlist argument.
If pIndexList is empty then all indices that originate in the class are rebuilt. If no indexes are specified in pIndexList or there are other bitmap indexes specified in pIndexList and there is a bitmap extent index defined for the class and there are currently no entries in the bitmap extent index then it will be implicitly included in pIndexList. If there is an ID range specified in pStartID-pEndID and there are either no indexes specified in pIndexList or if indexes are specified then at least one of them is a bitmap index then the bitmap extent index will be implicitly included in pIndexList. If the bitmap extent index is included then the bitmap extent index for each subextent is also built.
If pAutoPurge is true then the indices contained in pIndexList will be purged before they are built as long as no range is specified, if a range is specified we will skip any purge. The default is TRUE (1).
If pLockFlag is one (1) 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 build is completed. If it is two (2) then a lock is acquired prior to filing indexes for that instance and it is released as soon the indexes for that instance are filed. If it is zero (0) then no locks are used while filing the indexes. If it is three (3) then it an shared extent lock will be acquired before the indices are build.
If pJournalFlag is false then journaling is disabled for the processes used to build the indexes. If this flag is true then the journaling is enabled for the process used to build the indicies. The default value of this argument is "" meaning use the current process setting.
pStartID and pEndID define a range of IDs for which indexes will be built. The range is inclusive. If the starting ID is not passed a non-null value then the range begins at the first ID defined in the extent. If the ending ID is not passed a non-null value then the range ends at the last ID defined in the extent.
If pIgnoreIndexList is defined, it should be a $listbuild of index names that should not be built. This argument allows you to build 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 built.
If <method>OnBeforeBuildIndices</method> is implemented and is runnable then it will be called just prior to purging and building any index structures. Refer to <method>OnBeforeBuildIndices</method> for more information.
If <method>OnAfterBuildIndices</method> is implemented and is runnable then it will be called after all index structures have been built completely. Refer to <method>OnAfterBuildIndices</method> for more information.
Returns a <CLASS>Status</CLASS> value indicating success or failure. This method is normally generated by the storage class for persistent classes using <class>Storage.Persistent</class> or <class>Storage.SQL</class>.
If your index is corrupt running this function will not fix the corruption unless you rebuild the entire index and purge the existing indexes. If you have inserted some new items but have deferred building the index for these new items then you can run BuildIndices on this range oif IDs to add the index entries for these new items.
|
static |
This method is normally generated by the storage class for persistent classes using.
<class>Storage.Persistent</class> or <class>Storage.SQL</class>. Persistent classes using some other storage class, such as <class>Library.CustomStorage</class> must override this method.
|
static |
KillExtentData() - kills extent data in storage.
This method is
implemented by the storage class. If killstreams is true (default is false) it will also kill the default stream storage global.
_.Library.Status LoadData | ( | _.Library.String | id | ) |
LoadData() - loads an object from storage.
This method is
implemented by the storage class.
|
staticprivate |
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 <CLASS>Status</CLASS> value indicating success or failure. This method is normally generated by the storage class for persistent classes using <class>Storage.Persistent</class> or <class>Storage.SQL</class>. Persistent classes using some other storage class, such as <class>Library.CustomStorage</class> must override this method.
_.Library.Status SaveData | ( | _.Library.String | id | ) |
SaveData() - saves an object to disk, checks uniqueness and referential
integrity constraints, and maintains index structures. This method is implemented by the storage class.
|
staticprivate |
ValidateIndices() - Validates indices for a class
Parameters:
Returns: Status Code
Example: Do $SYSTEM.OBJ.ValidateIndices("Sample.Person","",1,2) Do $SYSTEM.OBJ.ValidateIndices("Sample.Company",$lb("NameIdx"),1,1)
Note::
Indices may also be validated by calling the class method $SYSTEM.OBJ.ValidateIndices(classname,idxList,autoCorrect,lockOption).
There is one main difference between validating indices through $SYSTEM.OBJ.ValidateIndices() and ##class(classname).ValidateIndices().
$SYSTEM.OBJ.ValidateIndices() will validate the indices for a table, and it will also validate any indices in collection child tables for that table.
When using ##class(classname).ValidateIndices(), collection child table indices must be checked with separate calls.
Also, when calling $SYSTEM.OBJ.ValidateIndices(), multiProcess default is 0. When calling ##class(classname).ValidateIndices(), multiProcess default is 1.
|
staticprivate |
ValidateTable() - Validates a table's data
Parameters:
Returns: Status Code
Example: Do $SYSTEM.OBJ.ValidateTable("Sample.Person",1,2) Do $SYSTEM.OBJ.ValidateTable("Sample.Company",1,1)
|
static |
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.