YggDIDMap.mesa
Copyright Ó 1985, 1988 by Xerox Corporation. All rights reserved.
Last edited by
Kolling on November 18, 1982 3:19 pm
MBrown on 12-Feb-82 17:26:28
Kupfer, February 14, 1985 11:41:49 am PST
Bob Hagmann April 28, 1988 9:14:04 am PDT
Carl Hauser, October 16, 1987 10:57:22 am PDT
Derived from Alpine's FileMap.mesa. Maps DID's to where the data really is (files, on-line archive, or logs).
DIRECTORY
YggDID USING [DID],
YggInternal USING[Document, FPMFileHandle, LogMap],
YggLock USING [LockID],
Rope USING[ROPE];
YggDIDMap: CEDAR DEFINITIONS =
BEGIN
Document: TYPE = YggInternal.Document;
Initialize: PROCEDURE[numHashSlotsDesired: NAT, fQLength: CARDINAL];
errors defined in this interface: none.
Register: PROCEDURE [did: YggDID.DID] RETURNS [doc: Document];
errors defined in this interface: none.
Finds or creates a Handle for the supplied DID.
DocumentFromLockID: PROC [lock: YggLock.LockID] RETURNS [Document];
Picks apart the LockID and uses the values to find the Handle. Similar to Register.
Access to immutable attributes.
GetDID: PROCEDURE [doc: Document] RETURNS [did: YggDID.DID];
errors defined in this interface: none.
GetName: PROC [doc: Document] RETURNS [Rope.ROPE];
no errors possible, but may return NIL.
Access to read/write attributes.
SetInterlock: PROCEDURE [doc: Document, new: BOOLEAN] RETURNS [old: BOOLEAN];
VerifyLogMapHandle: PROCEDURE [doc: Document, proc: PROCEDURE RETURNS [YggInternal.LogMap]] RETURNS [logMapHandle: YggInternal.LogMap];
errors defined in this interface: none.
The caller of VerifyLogMapHandle is absolutely responsible for catching any signals raised by proc and forcing the unwind that will release the monitor that VerifyLogMapHandle holds. The proc passed to VerifyLogMapHandle may return NIL if it is just doing an existence check.
VerifyFilePageMgrHandle: PROCEDURE [doc: Document, proc: PROCEDURE RETURNS [YggInternal.FPMFileHandle]] RETURNS [filePageMgrHandle: YggInternal.FPMFileHandle];
errors defined in this interface: none.
The caller of VerifyFilePageMgrHandle is absolutely responsible for catching any signals raised by proc and forcing the unwind that will release the monitor that VerifyFilePageMgrHandle holds.
ClearLogMapHandle: PROCEDURE [doc: Document, proc: PROCEDURE RETURNS [YggInternal.LogMap]];
errors defined in this interface: none.
The caller of ClearLogMapHandle is absolutely responsible for catching any signals raised by proc and forcing the unwind that will release the monitor that ClearLogMapHandle holds. The proc passed to ClearLogMapHandle may or may not result in the LogMapHandle being cleared.
Procedure to enter the Object's monitor, e.g., to serialize references to the file designated by the Object.
Enter: PROCEDURE [doc: Document, proc: PROCEDURE];
errors defined in this interface: none.
The caller of Enter is absolutely responsible for catching any signals raised by proc and forcing the unwind that will release the monitor that Enter holds.
Obtains the next in the enumeration of Handles.
GetNext: PROCEDURE [doc: Document ← NIL] RETURNS [NextDoc: Document];
errors defined in this interface: none.
handle = NIL starts a new enumeration, and nextHandle = NIL is returned when the enumeration is exhausted. The only guaranteed property of the enumeration is that all Handles in existence during the entire enumeration will be visited at least once; some handles may be seen more than once.
SetName: PROC [doc: Document, name: Rope.ROPE];
Record the file's name in its FileMap entry. This is so that other parts of Yggdrasil can easily get at the name.
SetRecoveryData: PROC [doc: Document, ref: REF];
Associates a REF with the file during recovery.
GetRecoveryData: PROC [doc: Document] RETURNS [ref: REF];
END.
CHANGE LOG
Edited on February 14, 1985 11:36:15 am PST, by Kupfer
Add SetName, GetName, and FileFromLockID for use by other parts of Alpine.
Carl Hauser, October 16, 1987 10:57:08 am PDT
Add SetRecoveryData, GetRecoveryData.