OldOwnerActionsImpl.mesa
Copyright c 1984 Xerox Corporation
Last edited by:
Taft on April 10, 1983 5:22 pm
Kolling on March 10, 1983 6:23 pm
Last Edited by: Kupfer, July 16, 1984 1:33:20 pm PDT
Carl Hauser, January 8, 1987 2:33:56 pm PST
DIRECTORY
OldAlpineEnvironment,
AlpineOwner,
OldAlpineOwner;
OldOwnerActionsImpl: PROGRAM
IMPORTS AlpineOwner, AO: OldAlpineOwner
EXPORTS OldAlpineOwner =
BEGIN OPEN AE: OldAlpineEnvironment;
Create: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, owner: AE.OwnerName, properties: LIST OF AE.OwnerPropertyValuePair, enforceTotalQuota: BOOLEAN] RETURNS[spaceLeftOnVolumeGroup: AE.PageCount] =
BEGIN
Work: PROC ~ {
[spaceLeftOnVolumeGroup] ← AlpineOwner.Create [conversation, transID, volumeGroupID, owner, properties, enforceTotalQuota];
};
DoWork[Work];
END;
Destroy: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, owner: AE.OwnerName] =
BEGIN -- non system-fatal errors: AccessFailed[alpineWheel], LockFailed[timeout], OperationFailed[ownerRecordInUse, spaceInUseByThisOwner], StaticallyInvalid, Unknown[owner, transID, volumeGroupID].
Work: PROC ~ {
AlpineOwner.Destroy [conversation, transID, volumeGroupID, owner];
};
DoWork[Work];
END;
ReadProperties: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, owner: AE.OwnerName, desiredProperties: AE.OwnerPropertySet] RETURNS [properties: LIST OF AE.OwnerPropertyValuePair] =
BEGIN
Work: PROC ~ {
properties ← AlpineOwner.ReadProperties [conversation, transID, volumeGroupID, owner, desiredProperties];
};
DoWork[Work];
END;
WriteProperties: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, owner: AE.OwnerName, properties: LIST OF AE.OwnerPropertyValuePair, enforceTotalQuota: BOOLEAN] =
BEGIN
Work: PROC ~ {
AlpineOwner.WriteProperties [conversation, transID, volumeGroupID, owner, properties, enforceTotalQuota];
};
DoWork[Work];
END;
ReadDBProperties: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID] RETURNS [nOwners, nEntriesUsed, nEntries: NAT, totalQuota, totalSpaceInUse, volumeGroupSize: AE.PageCount] =
BEGIN
Work: PROC ~ {
[nOwners, nEntriesUsed, nEntries, totalQuota, totalSpaceInUse, volumeGroupSize] ← AlpineOwner.ReadDBProperties [conversation, transID, volumeGroupID];
};
DoWork[Work];
END;
ReadNext: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, previousOwner: AE.OwnerName, desiredProperties: AE.OwnerPropertySet] RETURNS [owner: AE.OwnerName, properties: LIST OF AE.OwnerPropertyValuePair] =
BEGIN
Work: PROC ~ {
[owner, properties] ← AlpineOwner.ReadNext [conversation, transID, volumeGroupID, previousOwner, desiredProperties];
};
DoWork[Work];
END;
ReorganizeDB: PUBLIC PROCEDURE [conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, nEntries: NAT] =
BEGIN
Work: PROC ~ {
AlpineOwner.ReorganizeDB [conversation, transID, volumeGroupID, nEntries];
};
DoWork[Work];
END;
Unlock: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID] =
BEGIN
Work: PROC ~ {
AlpineOwner.Unlock [conversation, transID, volumeGroupID];
};
DoWork[Work];
END;
DoWork: PROC [work: PROC] RETURNS [] ~ {
accessReason: OldAlpineEnvironment.NeededAccess;
lockReason: OldAlpineEnvironment.LockFailure;
operationReason: OldAlpineEnvironment.OperationFailure;
unknownWhat: OldAlpineEnvironment.UnknownType;
{
ENABLE {
AlpineOwner.AccessFailed => {accessReason ← missingAccess; GOTO accessFailed};
AlpineOwner.LockFailed => {
lockReason ← SELECT why FROM
conflict, cantConvert => conflict,
timeout => timeout,
ENDCASE => ERROR;
GOTO lockFailed};
AlpineOwner.OperationFailed => {operationReason ← why; GOTO operationFailed};
AlpineOwner.StaticallyInvalid => {GOTO staticallyInvalid};
AlpineOwner.Unknown => {unknownWhat ← what; GOTO unknown};
};
work[];
EXITS
accessFailed => ERROR AO.AccessFailed[accessReason];
lockFailed => ERROR AO.LockFailed[lockReason];
operationFailed => ERROR AO.OperationFailed[operationReason];
staticallyInvalid => ERROR AO.StaticallyInvalid;
unknown => ERROR AO.Unknown[unknownWhat];
};
};
END.
CHANGE LOG
Edited on July 16, 1984 1:33:18 pm PDT, by Kupfer
Add some comments about SkiPatrolLog.