DIRECTORY AlpineEnvironment, AlpineTransMgrRpcControl, BasicTime; AlpineImport: DEFINITIONS LOCKS s.first USING s: Handle = BEGIN Register: PROC [server: AlpineEnvironment.FileStore] RETURNS [Handle]; Equal: PROC [s, t: Handle] RETURNS [BOOLEAN] = INLINE { RETURN [s=t] }; Name: PROC [s: Handle] RETURNS [AlpineEnvironment.FileStore] = INLINE { RETURN [s.first.server] }; GetTransMgrInterface: ENTRY PROC [s: Handle] RETURNS [AlpineTransMgrRpcControl.InterfaceRecord] = INLINE { ENABLE UNWIND => NULL; IF s.first.transMgrInterface = NIL THEN NewInterfaces[s]; RETURN [s.first.transMgrInterface] }; TransMgrInterfaceCallFailed: PROC [ s: Handle, i: AlpineTransMgrRpcControl.InterfaceRecord]; Object: TYPE = MONITORED RECORD [ server: AlpineEnvironment.FileStore, local: BOOL _ FALSE, mostRecentRegister: BasicTime.GMT, mostRecentBind: BasicTime.GMT, transMgrInterface: AlpineTransMgrRpcControl.InterfaceRecord _ NIL ]; Handle: TYPE = LIST OF Object; nullHandle: Handle = NIL; NewInterfaces: PRIVATE PROC [s: Handle]; END.--AlpineImport HAlpineImport.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Shared communication paths (interface instances) to Alpine servers. One instance per machine, NOT one per FileStore. Last edited by MBrown on January 30, 1984 11:49:28 am PST Taft on 1-Feb-82 13:01:29 Hauser, March 7, 1985 2:13:07 pm PST NOTES: Right now the only path used between servers is AlpineTransMgr, but someday other interfaces will be used (for instance, to detect lock cycles). We do not (yet) allow Unregister. The time-stamp that Register records should help. If we allow Unregistering, then we'll have to change the implementation of Equal to compare server names. Handle: TYPE = REF opaque; (really defined below, allowing us to use inlines) Returns a Handle that is (permanently) associated with the indicated server. This call performs no communication; in particular, there is no guarantee that a Handle ever contains an interface bound to the indicated server. Client may use the built-in assignment operation on Handles, and may use the following additional operations: Makes one binding try, and returns NIL as the second result if it fails. Otherwise returns an AlpineCoordinator interface that is bound to the server implied by Handle s. It is CRUCIAL that the client hang on to the REF AlpineCoordinatorIR during any call made through the interface; this is what prevents the binding of the interface from changing out from under the client. This is guaranteed as long as the client does not FORK the interface procedure or pass the procedure value to someone else. This call serves notice that a call made through interface i, which was derived from Handle s, has failed and hence the interface should probably be discarded. The following should be considered opaque to the client, but is here to allow Equal, Name, and GetTransMgrInterface to be defined inline. immutable, since clients store Handles in their data structures. part of the kludge for providing local calls: tells ConversationTable what to do protected by monitor ! (none.) Hauser, March 7, 1985 2:12:51 pm PST Nodified, added copyright. ΚΏ˜šœ™Icodešœ Οmœ1™<—JšœC™CJšœ0™0šœ™Jšœ*™*Jšœ™K™$—J˜Jšœ™J˜JšœK™KJšœD™DJšœT™TJšœJ™JJšœ™˜šΟk ˜ J˜J˜J˜ J˜——šœž œžœ žœ ˜9Jšž˜J˜JšœN™NJ˜šΟnœžœ'žœ ˜FJšœL™LJšœN™NJšœB™BJ˜—JšœD™DJšœ(™(J˜š Ÿœžœžœžœžœ˜7Jšžœ ˜J˜—šŸœžœ žœ!žœ˜GJšžœ˜J˜—šŸœžœžœ ˜,Jšžœ.žœ˜=Jšžœžœžœ˜Jšžœžœžœ˜9Jšžœ˜%JšœH™HJšœL™LJšœ™JšœK™KJšœM™MJšœN™NJšœO™OJšœ™J˜—šŸœžœ˜#J˜8JšœO™OJšœO™OJ˜J˜—JšœM™MJšœ;™;J˜šœžœž œžœ˜!˜$Jšœ@™@—šœžœžœ˜JšœP™P—Jšœžœ˜"Jšœžœ˜šœ>ž˜AJšœ™—J˜J˜—Jšœžœžœžœ˜Jšœžœ˜J˜šŸ œžœžœ ˜(Jšœ ™ J˜—JšžœΟc˜—™$K™—K™—…—%