Procedures
ReadOwnerFileHeader:
PROCEDURE[conversation: AlpineEnvironment.Conversation, transID: AlpineEnvironment.TransID, volumeGroupID: AlpineEnvironment.VolumeGroupID]
RETURNS[version:
NAT, recordedVolGroupID: AlpineEnvironment.VolumeGroupID, totalQuota, quotaLeft: AlpineEnvironment.PageCount, numberOfOwners, numberOfOwnerSlotsInUse, maxNumberOfOwnersAllowed:
NAT];
! AccessFailed[alpineWheel], LockFailed[timeout], OperationFailed[transAborted], Unknown[transID, volumeGroupID].
This is permitted only if the caller is an asserted AlpineWheel. This procedure gets a write lock on the owner data base file. Note that ReadOwnerFileHeader and GetNextRecord called in the same transaction will be consistent provided the transaction doesn't alter the owner database file itself.
ReadNextOwnerRecord:
PROCEDURE[conversation: AlpineEnvironment.Conversation, transID:
AlpineEnvironment.TransID, volumeGroupID: AlpineEnvironment.VolumeGroupID, contRecNum:
INT ← 0, desiredProperties: AlpineEnvironment.OwnerPropertySet ← AlpineEnvironment.allOwnerProperties]
RETURNS[entryEmpty, entryValid:
BOOLEAN, owner: AlpineEnvironment.OwnerName, properties:
LIST
OF AlpineEnvironment.OwnerPropertyValuePair, nextContRecNum:
INT];
! AccessFailed[alpineWheel], LockFailed[timeout], StaticallyInvalid (badRecordNumber), Unknown[transID, volumeGroupID].
This is permitted only if the caller is an asserted AlpineWheel. This procedure gets a write lock on the owner data base file. Enumerates the current entries in the owner data base, including those no longer or never valid. contRecNum = 0 starts a new enumeration, and nextContRecNum = 0 is returned when the enumeration is exhausted. We use the pair entryEmpty, entryValid instead of an enumerated type to avoid putting a definition in AlpineEnvironment. (entryEmpty, entryValid) = (TRUE, undef) means the record has never been written into. (entryEmpty, entryValid) = (FALSE, TRUE) means that the entry is currently valid. (entryEmpty, entryValid) = (FALSE, FALSE) means that the entry has been deleted. Iff entryEmpty = FALSE, then the return values owner and properties are valid.
ChangeSpaceForOwner:
PROCEDURE [conversation: AlpineEnvironment.Conversation, transID: AlpineEnvironment.TransID, volumeGroupID: AlpineEnvironment.VolumeGroupID, owner: AlpineEnvironment.OwnerName, nPages: AlpineEnvironment.PageCount];
! AccessFailed[alpineWheel], LockFailed[timeout], OperationFailed[quotaExceeded], StaticallyInvalid (badLengthName), Unknown[owner, transID, volumeGroupID].
ReadDBUniversalFile:
PROCEDURE[volumeGroupID: AlpineEnvironment.VolumeGroupID]
RETURNS[dBID: AlpineEnvironment.UniversalFile];
! Unknown[volumeGroupID].
ReportAccessCacheStats: PROCEDURE RETURNS [nCacheEntries: NAT, statsCacheHit, statsGrapevineAuthorized, statsGrapevineNotAuthorized, statsRegServersDown, statsIndivGrapeNotAuthorized: INT];
ReportAccessVolatileStats: PROCEDURE RETURNS [nRegs, nInits, nUnRegs, nReorganizes, nEnumAlls, nAllocReqsWin, nAllocReqsLose, nDeallocReqs, nRemoveOwner, nEnumFindWin, nEnumFindLose, nSetEnums, nActions, nPhaseOnes, nPhaseTwos, nAborts: INT];
CrashSystem:
PROCEDURE [conversation: AlpineEnvironment.Conversation, transID:
AlpineEnvironment.TransID];
! AccessFailed[alpineWheel], Unknown[transID].
Errors
AccessFailed: ERROR[missingAccess: AlpineEnvironment.NeededAccess];
LockFailed: ERROR[why: AlpineEnvironment.LockFailure];
OperationFailed: ERROR[why: AlpineEnvironment.OperationFailure];
StaticallyInvalid: ERROR;
Unknown: ERROR[what: AlpineEnvironment.UnknownType];
END.