YggVolatileObjectCache.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Bob Hagmann July 21, 1988 5:07:46 pm PDT
Private interface for the volatile object cache.
DIRECTORY
YggDID USING [DID],
YggEnvironment USING [LockMode, TransID],
YggRep USING [VDoc];
YggVolatileObjectCache: CEDAR DEFINITIONS
~ BEGIN
Procedures
LookupDIDInCache: PROC [did: YggDID.DID, transID: YggEnvironment.TransID, mode: YggEnvironment.LockMode] RETURNS [vDoc: YggRep.VDoc];
Given a DID, transaction, and lock mode, return the volatile form of the document if it is cached. If the object is reserved, block until this is over.
ReserveDIDInCache: PROC [did: YggDID.DID, transID: YggEnvironment.TransID];
Given a DID, reserve this DID as being volatized. Calling this procedure obligates the caller to call CacheDID to clear the reservation.
UnreserveDIDInCache: PROC [did: YggDID.DID, transID: YggEnvironment.TransID];
Undo a reservation.
CacheDID: PROC [did: YggDID.DID, transID: YggEnvironment.TransID, vDoc: YggRep.VDoc];
Add this document to the cache for the did.
InvalidateDID: PROC [did: YggDID.DID, transID: YggEnvironment.TransID];
Remove this did from the cache.
PromoteToParent: PROC [did: YggDID.DID, transID: YggEnvironment.TransID];
Update transaction commits means that the cache entry is promoted.
SetSizeOfDIDCache: PROC [size: INT];
Set the desired size of the cache.
END.