Last edited by
MBrown on January 31, 1984 8:34:42 pm PST
Kolling on January 31, 1983 5:32 pm
Last Edited by: Kupfer, March 21, 1985 12:12:19 pm PST
Carl Hauser, March 26, 1987 11:20:44 am PST
Hauser, March 25, 1985 1:37:35 pm PST
AlpineControl:
DEFINITIONS =
BEGIN
FileID: TYPE = AlpineEnvironment.FileID;
VolumeID: TYPE = AlpineEnvironment.VolumeID;
FileStore: TYPE = AlpineEnvironment.FileStore;
PageCount: TYPE = AlpineEnvironment.PageCount;
ROPE: TYPE = Rope.ROPE;
Initialize:
PROC [
filePageMgrNormalChunks: NAT,
filePageMgrLogChunks: NAT,
filePageMgrLeaderChunks: NAT,
coordinatorMapHashArraySlots: NAT, -- prefers a power of two
transactionMapHashArraySlots: NAT, -- prefers a power of two
fileMapHashArraySlots: NAT, -- prefers a prime
openFileMapHashArraySlots: NAT, -- prefers a power of two
lockHashArraySlots: NAT,
fileMapFinalizationQueueLength: NAT,
nAccessCacheEntries: NAT,
alpineWheels: ROPE -- e.g. "AlpineImplementors^.pa"
];
Must be called before calling Start. If called several times, all calls but the first
are no-ops.
Start:
PROC [
fileStore: FileStore,
"Local.alpine" means use system volume, otherwise look for named volume
this is the name of the volume containing the log
additionalVolumes:
LIST
OF
ROPE ←
NIL,
any additional volumes to operate in the same volume group
logVolumeName:
ROPE ←
NIL,
name of the File volume containing the log file for fileStore; defaults to fileStore.
typeOfRestart: TypeOfRestart,
$warmStart means read log,
$coldStart means erase log,
$createServer means erase everything,
$resizeLog means erase the log and recreate it with (possibly) a different size.
nLogPages, nOwners:
INT
used only if typeOfRestart = $createServer or $resizeLog
];
TypeOfRestart: TYPE = {warmStart, coldStart, createServer, resizeLog};
IsStarted: PROC [] RETURNS [BOOL];
ExportInterfaces:
PROC [newNames:
BOOL ←
FALSE];
Exports public interfaces for remote use. If newNames is TRUE, the interfaces are exported with names like "AlpineFile.newAlpine", otherwise "AlpineFile.alpine". This is useful when moving to a new version of the RPC interfaces.
UnexportInterfaces:
PROC [];
Unexports the public interfaces.
Halt:
PROC [waitMinutes:
CARDINAL]
RETURNS [nCoordinators:
NAT];
Unexports all the public interfaces, waits "waitMinutes" minutes, aborts all workers on this machine, and returns the number of remaining coordinators (ie., ones that didn't have local workers).
END.