A list of global subscript ranges describing the entire key space of a single global. More...
Public Member Functions | |
_.Library.List | Insert (SYS.DataCheck.GlobalReference gloref1, SYS.DataCheck.GlobalReference gloref2, SYS.DataCheck.RangeState state, _.Library.List cachetoken, _.Library.Status sc) |
Inserts a new range into the range list, merging and splitting with existing. More... | |
ReleaseCacheToken (_.Library.List cachetoken) | |
Takes as argument a cachetoken returned from <METHOD>Insert</METHOD> and releases the cache. More... | |
SetCollation (_.Library.Integer col) | |
Sets the <PROPERTY>Collation</PROPERTY> to the value of the 'col' parameter. More... | |
Static Public Member Functions | |
_.Library.String | GetActiveResultsListSet (_.Library.String systemname) |
Given a DataCheck system name, returns the ListSet of the currently active set of results. | |
_.Library.String | GetListSetEndTime (_.Library.String systemname, _.Library.String listset) |
Given a DataCheck system name and a list set, returns the date and time in $horolog format. More... | |
_.Library.String | GetListSetStartTime (_.Library.String systemname, _.Library.String listset) |
Given a DataCheck system name and a list set, returns the date and time in $horolog format. More... | |
Public Attributes | |
AggregateState | |
One of the following constants, defined for convenience in syDataCheck.inc: More... | |
Collation | |
Collation of global or -1 if unknown. More... | |
Database | |
Database referenced by this RangeList. More... | |
GlobalName | |
Global name referenced by this RangeList. More... | |
ListSet | |
The set of RangeLists that this object is a member of. More... | |
SystemName | |
DataCheck system name that this RangeList belongs to. More... | |
Private Member Functions | |
_.Library.Status | OnNew (_.Library.String systemname, _.Library.String set, SYS.DataCheck.LocalDatabase database, _.Library.String globalname) |
Constructor for RangeList. More... | |
A list of global subscript ranges describing the entire key space of a single global.
Objects of this class are the list header with properties for the list metadata. The <QUERY>ListElements</QUERY> query provides the list elements as rows.
The RangeList is used to store results of the check and also the include/exclude subscript ranges to check (see <PROPERTY>ListSet</PROPERTY> property for more info)
RangeList objects that store results are maintained by the DataCheck destination system and should not be modified.
To create/edit a global selection RangeList as part of configuring a DataCheck destination system, the sequence is as follows. Note that the system must be configured to use global selection RangeLists in order for this to have an effect:
1. To create a new RangeList object, passing the appropriate arguments to the New() constructor (see <METHOD>OnNew</METHOD>); then call <METHOD>SetCollation</METHOD>. To edit an existing RangeList object, you can open through the <INDEX>MainIndex</INDEX> with the <METHOD>MainIndexOpen</METHOD> method.
2. Call <METHOD>Insert</METHOD> repeatedly, setting the desired ranges to state $$$RangeStateExcluded, with the rest being $$$RangeStateIncluded.
3. Call <METHOD>Save</METHOD> to save the object.
|
private |
Constructor for RangeList.
Input Parameters: systemname: name of the DataCheck destination system set: set that this rangelist is a member of; see <PROPERTY>ListSet</PROPERTY> database: The local database path for non-mirror DataCheck configurations; the mirror database name, in :mirror:mirrorname:mirrorDBname format, for mirrored DataCheck configurations. globalname: name of the global that this rangelist represents (leading ^ is optional)
IMPORTANT: The creator of a global selection RangeList is responsible for ensuring that the database is specified correctly, and for non-mirror DataCheck configurations, that it has a mapping specified in the DataCheck configuration.
|
static |
Given a DataCheck system name and a list set, returns the date and time in $horolog format.
when all pending DataCheck queries finished, with the specified list set was the active one.
Returns null if there are queries pending and the specified list set is the active one, or if the specified list set does not exist. If the specified list set is the active one, the value may change from non-null back to null if new queries are run.
|
static |
Given a DataCheck system name and a list set, returns the date and time in $horolog format.
when the check whose results are stored in that list set began. Returns null if the set does not exist.
_.Library.List Insert | ( | SYS.DataCheck.GlobalReference | gloref1, |
SYS.DataCheck.GlobalReference | gloref2, | ||
SYS.DataCheck.RangeState | state, | ||
_.Library.List | cachetoken, | ||
_.Library.Status | sc | ||
) |
Inserts a new range into the range list, merging and splitting with existing.
ranges as appropriate. Caller must call <METHOD>Save()</METHOD> to save.
Input Parameters: gloref1: beginning of the range to insert (inclusive) gloref2: end of range to insert (exclusive) state: state of the range to insert cachetoken: (optional) A token returned from a previous call to Insert(). See below for more detail. Output Parameters: sc: Status returned from this call. If an error occurs that is not simply the result of invalid input, the RangeList needs to be reloaded to return to a valid state; in this case subsequent calls to Insert or attempts to save the RangeList will result in $$$DCRangeListErrorStatus errors.
Returns: Returns a "cachetoken" that reserves some of the list elements in a cache to optimize the next insert. Caller must maintain this cachetoken as described below. If the status in 'sc' is not $$$OK, the cachetoken shall be null.
The cachetoken returned from a call to Insert() should be passed in to the next call to Insert() that is to act on a nearby part of the list. Each call to Insert() that is passed a token will: start a linear scan of the list from elements referenced in the passed cachetoken (assuming those elements are still cached and haven't be removed by intervening modifications to the list); release the cache reservation on the elements that the token references; and return a new cachetoken with an updated cache reservation. If an Insert() call is not known to be acting on a region of the list near to a cachetoken that the caller has from a previous Insert() call, the caller should instead pass a null cachetoken. When no cachetoken is passed, Insert() will evaluate all cached elements to determine an optimal starting location.
The caller is responsible for releasing the cache reservation for any cachetoken returned from Insert() that is not used in a later Insert() call. The cache reservation should be released by passing the unused cachetoken to <METHOD>ReleaseCacheToken()</METHOD> or by closing the RangeList object.
ReleaseCacheToken | ( | _.Library.List | cachetoken | ) |
Takes as argument a cachetoken returned from <METHOD>Insert</METHOD> and releases the cache.
reservation of the cached elements.
SetCollation | ( | _.Library.Integer | col | ) |
Sets the <PROPERTY>Collation</PROPERTY> to the value of the 'col' parameter.
if specified. If no value is specified, obtains it from the local system by looking at the global referenced by this RangeList object, if it exists, or from the default for the database referenced by this RangeList object. Throws an exception if it was already set to a valid collation. Caller must call <METHOD>Save()</METHOD> to save.
AggregateState |
One of the following constants, defined for convenience in syDataCheck.inc:
1 - $$$RangeStateMatched - the entire global, less any excluded ranges, was found to be matched 0 - $$$RangeStateUnknown - the entire global has not been checked yet, but no discrepancies found -1 - $$$RangeStateUnmatched - some ranges have discrepancies
Collation |
Collation of global or -1 if unknown.
GlobalName |
Global name referenced by this RangeList.
ListSet |
The set of RangeLists that this object is a member of.
Integer values 1 and higher are the set of results generated by the DataCheck system and incremented each time the system starts a new set of results. The currently active set of results is returned by <METHOD>GetActiveResultsListSet</METHOD>. A value of "%GS" ($$$RangeListSetGlobalSelection) indicates that this object is a member of the set of configured subscript ranges to include / exclude from the check.