File DBStorageTuple.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last edited by
MBrown on December 3, 1982 9:14 pm
Cattell on November 4, 1983 2:27 am
Willie-Sue, February 15, 1985 11:18:15 am PST
Widom, September 3, 1985 6:26:15 pm PDT
Donahue, March 10, 1986 7:57:44 am PST
DIRECTORY
DBCommon USING [Segment, CacheHandle],
DBStorage USING [TupleHandle],
DBStorageTID USING [TID];
DBStorageTuple: CEDAR DEFINITIONS = BEGIN
This interface defines a collection of operations on DBStorage.TupleObjects that
may be used by storage-level modules that don't export DBStorage.TupleObject.
Some modules export DBStorage.TupleObject simply to get read access to the TID without
the cost of a procedure call, and use these procedures for other accesses.
InitSegmentTuples: PUBLIC PROC [segment: DBCommon.Segment];
Called from DBStorage.AttachSegment to set up the tuple management for the segment.
ConsTupleObject: PROC [tid: DBStorageTID.TID, cacheHint: DBCommon.CacheHandle ← NIL]
RETURNS [DBStorage.TupleHandle];
Returns a handle for a new tuple object with the given tid and cacheHint.
TIDOfTuple: PROC [x: DBStorage.TupleHandle] RETURNS [DBStorageTID.TID];
Returns the TID of x.
EqualTuple: PROC [x, y: DBStorage.TupleHandle] RETURNS [BOOLEAN];
Returns TIDOfTuple[x] = TIDOfTuple[y].
NullTupleHandle: PROC [] RETURNS [DBStorage.TupleHandle];
Returns a TupleHandle x such that TIDOfTuple[x] = NullTID.
No caller should modify the contents of this TupleObject in any way!!!
InvalidateMatchingTuples: PROC [x: DBStorage.TupleHandle];
For all tuple handles y on active list such that y.tid = x.tid, makes y.tid=NullTID.
IsValidTuple: PROC [x: DBStorage.TupleHandle] RETURNS [valid: BOOL];
IF DBSegment.IsValidTID[x.tid] THEN RETURN [valid: TRUE]
ELSE { x.tid ← NullTID; RETURN [valid: FALSE] }
InvalidateTuple: PROC [x: DBStorage.TupleHandle];
x.tid ← NullTID
CallAfterFinishTransaction: PROC [s: DBCommon.Segment];
Invalidates (by setting tid = NullTID, cacheHint = NIL) all TupleObjects on the active
list that reference segment s.
PrintTupleObject: PROC [t: DBStorage.TupleHandle];
Prints t to debug stream, without a terminating CR.
CheckState: PROC [segment: DBCommon.Segment, doPrinting: BOOLEANFALSE];
Checks internal state of tuple manager; if doPrinting, also prints contents
of tuple manager to debug stream.
END.--DBStorageTuple