DIRECTORY Camelot USING [segmentIdT, tidT], YggDID USING [DID], YggInternal USING[Document, FileHandle], Rope USING[ROPE]; YggDIDMap: CEDAR DEFINITIONS = BEGIN Document: TYPE = YggInternal.Document; Run: TYPE = RECORD [ segmentId: Camelot.segmentIdT, -- segment for fragment segmentPage: CARD, -- offset in segment in pages firstPage: INT, -- page number in file of first byte (-1 for leader) pages: INT, -- for non-leader, number of pages (0 for leader) leader: BOOL -- flag for leader (leaders, if used, are 256 bytes long and are not allocated with the rest of the document) ]; NullRun: Run = [[0], 0, 0, 0, FALSE]; RunList: TYPE = LIST OF Run; OpenDocumentFromDID: PROC [did: YggDID.DID, tid: Camelot.tidT, destroyedOK: BOOL _ FALSE] RETURNS [doc: Document]; MarkInterestInDID: PROC [did: YggDID.DID]; GetDID: PROC [doc: Document] RETURNS [did: YggDID.DID]; GetLinkInfo: PROC [doc: Document] RETURNS [fromDID, toDID: YggDID.DID, linkType: Rope.ROPE]; SwapLinkInfo: PROC [doc: Document, newFromDID, newToDID: YggDID.DID, newLinkType: Rope.ROPE] RETURNS [oldFromDID, oldToDID: YggDID.DID, oldLinkType: Rope.ROPE]; GetComponentFiles: PROC [doc: Document] RETURNS [componentFiles: LIST OF YggInternal.FileHandle]; AddComponentFile: PROC [doc: Document, componentFile: YggInternal.FileHandle, tid: Camelot.tidT]; RemoveComponentFile: PROC [doc: Document, componentFile: YggInternal.FileHandle, tid: Camelot.tidT]; GetName: PROC [doc: Document] RETURNS [Rope.ROPE]; CreateNewDID: PROC [tid: Camelot.tidT] RETURNS [did: YggDID.DID]; CreateExplicitDID: PROC [tid: Camelot.tidT, did: YggDID.DID] RETURNS [ok: BOOL]; -- use only for well known dids DestroyDID: PROC [tid: Camelot.tidT, did: YggDID.DID]; GetRootDIDs: PROC RETURNS [dids: LIST OF YggDID.DID]; AddRootDID: PROC [did: YggDID.DID] RETURNS [ok: BOOL]; RemoveRootDID: PROC [did: YggDID.DID] RETURNS [ok: BOOL]; RemoveRuns: PROC [did: YggDID.DID, tid: Camelot.tidT, runList: RunList]; AddRuns: PROC [did: YggDID.DID, tid: Camelot.tidT, fileUse: ATOM, runList: RunList]; SetByteSize: PROC [did: YggDID.DID, tid: Camelot.tidT, fileUse: ATOM, bytes: INT]; PreCommit: PROC [tid: Camelot.tidT]; Commit: PROC [tid: Camelot.tidT]; Abort: PROC [tid: Camelot.tidT]; InitDIDMap: PROC [firstTime: BOOL]; FlushDocument: PROC [did: YggDID.DID, tid: Camelot.tidT]; END. ’YggDIDMap.mesa Copyright Σ 1988, 1989 by Xerox Corporation. All rights reserved. Last edited by Bob Hagmann March 21, 1989 10:18:31 am PST Maps DID's to where the data really is (files, on-line archive, or logs). Types Document procedures Finds or creates a Document for the supplied DID and transaction. Notes continued interest in this did. Access to immutable attributes. Get the did for the Document. Get the link info for the Document. Swap the link info for the document, and report what it used to be. Find all component files for the Document. Add a new component file for the Document. Remove an old component file from the Document. no errors possible, but may return NIL. Access to root DID's. Document modifications Normally, only called by the file package during it's pre-commit. tid is a top level transaction. Runs listed are removed from the object. Also used when an object is migrated. Caller guarentees that PreCommit will later be called with this tid (if the system doesn't crash). Normally, only called by the file package during it's pre-commit. tid is a top level transaction. Runs listed are added to the object. Also used when an object is removed from the disk cache. Normally, only called by the file package during it's pre-commit. tid is a top level transaction. The size of valid bytes is set to this amount, but the pages for the file are not changed. Transactions Called just before Camelot is called to try to commit. Called after Camelot claims the transaction committed. Transaction has aborted. Initialization Called once recoverable storage is known and recovered Testing Flush a document out of the cache. Testing only!! Κ0˜Jšœ™JšœB™Bšœ™Icodešœ*™*K™—KšœΟkœA™IJ˜š ˜ Kšœœ˜!Kšœœœ˜Kšœ œ˜(šœœœ˜K˜K˜——KšΟn œœ œ˜K˜Kš˜head™KšΟbœœ˜&K˜šžœœ˜Kšœ Οc˜7Kšœ œ ˜1Kšœ œ 4˜EKšœœ 1˜>Kšœœ m˜zK˜—KšΠbnœœ˜%KšŸœœœœ˜—šžœ ™š žœœœ"œœœ˜rKšœ-œ™AK˜—šžœœœ˜*K™%K˜—šœ™K˜—šžœœœœ˜7Kšœ™K˜—š ž œœœœ œ˜\Kšœ#™#K˜—šž œœ.œ  œœœ  œ˜ KšœC™CK˜—š žœœœœœ˜aKšœ*™*K˜—šžœœK˜aKšœ*™*K˜—šžœœL˜eKšœ/™/K˜—šžœœœœ˜2Kšœ#œ™'K˜—K˜Kšž œœœœ˜AK˜š žœœ!œœœ ˜qK˜—Kšž œœ!œ˜6K˜˜K˜—Kšœ™K™š ž œ œœœœ˜5K˜—š ž œœœœœ˜6K˜—Kš ž œœœœœ˜9—šžœ™šž œœ œ'˜HKšœ—™——K˜šžœœ œœ˜TKšœΒ™ΒK™—š ž œœœœ œ˜RKšœΎ™Ύ——™ šž œœ˜$K™6—K˜šžœœ˜!K™6—K˜šžœœ˜ K™—˜K˜——™šž œœ œ˜#K™6—˜K˜——™šž œœœ˜9K™2—˜K˜——K˜Kšœ˜K˜K˜—…— 0ς