<> <> <> <> <> <> <> <> <> <> <> DIRECTORY Basics, Camelot, ConstArith, Mach, Rope, YggDID; YggEnvironment: CEDAR DEFINITIONS = BEGIN <> dsPort: Mach.portT; serverID: Camelot.serverIdT; tsPort: Mach.portT; mPort: Mach.portT; sPort: Mach.portT; sharedMemAddr: Mach.vmAddressT; tPort: Mach.portT; aPort: Mach.portT; atPort: Mach.portT; taPort: Mach.portT; applicationID: Camelot.applicationIdT; <> <> Principal: TYPE = Rope.ROPE; -- an individual (Grapevine, Clearinghouse, ...???) FileStore: TYPE = Principal; -- an Yggdrasil instance RName: TYPE = Rope.ROPE; -- an arbitrary Grapevine RName (or other name server) OwnerName: TYPE = Rope.ROPE; -- an Alpine owner, not necessarily an RName AccessList: TYPE = LIST OF RName; <> DID: TYPE = YggDID.DID; -- ID of a document nullDID: DID = NIL; -- the ID of no document PageNumber: TYPE = INT; -- should be [0..maxPagesPerFile] PageCount: TYPE = INT; PageRun: TYPE = RECORD [ firstPage: PageNumber, count: INT _ 1]; maxPagesPerFile: INT = INT.LAST; WordNumber: TYPE = ConstArith.Const; <> WordCount: TYPE = WordNumber; <> DeviceCharacteristics: TYPE = REF DeviceCharacteristicsRep; wordsPerPage: CARD; bytesPerPage: CARD; DeviceCharacteristicsRep: TYPE = RECORD [ wordsPerPage: CARD32, bytesPerPage: CARD32, logWordsPerPage: CARD16, logBytesPerPage: CARD16]; <> OpenFileID: TYPE [UNITS[CARD32]]; -- represents a single client's access to a single file under a single transaction. Unique only within a single Alpine instance. nullOpenFileID: OpenFileID = LOOPHOLE[LONG[0]]; -- ID of no open file AccessRights: TYPE = {readOnly, readWrite}; LockMode: TYPE = {read, write, directoryRead, directoryWrite}; LockOption: TYPE = RECORD [ mode: LockMode, ifConflict: {wait, fail}]; RecoveryOption: TYPE = {log, noLog}; ReferencePattern: TYPE = {random, sequential}; -- a client-supplied hint about the expected pattern of references to pages of a file. Sequential means that when the client reads or writes an interval [p .. p+n) of the file, there is a high likelihood that it will reference pages [p+n .. p+2*n) in the near future. Random means that no such pattern is expected. Specifying this hint accurately enables the server to perform the operations more quickly and efficiently. <> TransID: TYPE = Camelot.tidT; nullTransID: Camelot.tidT = []; Outcome: TYPE = {active, suspended, abort, commit, unknown}; CommitOrAbort: TYPE = Outcome [abort .. commit]; WorkerState: TYPE = {notReady, readOnlyReady, ready}; <> NeededAccess: TYPE = {alpineWheel, fileModify, fileRead, handleReadWrite, ownerCreate, ownerEntry, spaceQuota}; -- when access is denied, indicates the access control list in which client's membership was required but not present OperationFailure: TYPE = { busy, -- server is too busy to start another transaction duplicateOwner, duplicateVolumeGroup, duplicateVolume, inconsistentDescriptor, -- PageBuffer word count and PageRun page count are inconsistent volumeFragmented, -- cannot find enough contiguous pages to create or extend file insufficientSpace, -- in volume group to create or extend file nonexistentFilePage, -- attempted to access page beyond last page of file ownerFileFormatOrVolGroupMismatch, ownerRecordInUse, quotaExceeded, -- attempt to create or extend file would exceed owner's quota regServersUnavailable, -- access check failed due to Grapevine unavailability spaceInUseByThisOwner, tooManyRNames, totalQuotaExceeded, cantCommitSuspendedTrans, cantAbortSuspendedTrans, cantCommitCommittedTrans, cantAbortCommittedTrans, cantCommitAbortedTrans, cantAbortAbortedTrans }; LockFailure: TYPE = { conflict, -- lock cannot immediately be set because a conflicting lock is already set by another transaction timeout}; -- lock cannot be set even after waiting a long time, perhaps due to undetected deadlock UnknownType: TYPE = { coordinator, -- coordinator RName not known to Grapevine (CreateWorker) fileID, -- no file with this ID in specified volume openFileID, -- no open file with this ID, or ID presented from wrong conversation owner, -- no owner with this name in owner data base for specified volume group transID, -- no transaction active with this ID on this Alpine instance. It may be that the transaction has aborted or that the server has crashed and restarted. volumeID, -- no volume with this ID is on-line volumeGroupID}; -- no volume group with this ID is on-line END.