Next: , Previous: MozBase Methods, Up: Core Methods



5.1.2 Storage Methods

— Method on Storage: start args modules serverObjFileNum realStart newMoz

Extracts command line arguments from args, sets up links to external Oz modules, and if serverObjFileNum is passed, set the internal file number where the Server object is known to reside to that number. This only happens when the MOZ is being re-initialized.

newMoz is used to tell the method that this is the initialization of a completely new moz.

— Method on Storage: sync None

Syncs all MOZ objects to disk.

— Method on Storage: stop None

Saves all MOZ objects to disk.

— Method on Storage: info None

Outputs debugging information; currently all commented out.

— Method on Storage: init ozName fileNumToOzName storageRef languageStringsObjectRef

Initializes a new Storage object, mostly using MozBase,init. fileNumToOzName is a dictionary that normally only contains a mapping from the number 1 to the new Storage object's Oz name. Initializes some other dictionaries.

— Method on Storage: loadClasses None

Compiles and loads all the MOZ's .class files.

— Method on Storage: loadObject fileNum objectRef init

This method loads an object from the disk by its number (using the fileNumToOzName dictionary). It returns the object record in objectRef.

— Method on Storage: saveObject objectWrapper ozName

This method saves the object information to disk. Note that objectWrapper is just the Active Object wrapper, not the standard object reference object.

— Method on Storage: createObject className objectRef ozName init

Creates an object, returning a standard object reference in objectRef.

— Method on Storage: getClass className class

Returns the class code for the given className

— Method on Storage: upgradeObject objectRef className newObjectRef

Upgrades the given object to the given class, returning newObjectRef. Note that this could be the same class name as before, but the class itself has been re-loaded in the mean time. In fact, that should be the most common type of upgrade.

— Method on Storage: getObjectFileNum objectRef fileNum

Take an object reference record and returns the file number associated with that object reference. Not for general use!

— Method on Storage: getServerObjFileNum serverObjFileNum

Returns the file number for the Server object. Not for general use!

— Method on Storage: setServerObjFileNum serverObjFileNum

Sets the file number for the Server object. Not for general use!

— Method on Storage: getObjectFromFileNum fileNum objectRef

Retrieves an object given the file number it is stored in. Not for general use!

— Method on Storage: objectRefFromRecord convert

This is the procedure that fromRecord needs to instantiate attrs of type 'object'. Full details are in the source.

This is so far from being for general use that it's not even funny.

— Method on Storage: logLevel level

Set the current logging level to level. Logging levels are, in order from most to least verbose, debug, info, warn, error, and critical.

The default is warn. For whatever level is selected, that level of log message and above (above meaning "less verbose" or "more severe") are printed.

— Method on Storage: getConnectionModule module

Returns a copy of the Connection module. That's the Oz Connection module, NOT the MOZ Connection class. Used by the Gate and Terminus classes.

— Method on Storage: getPickleResult url pickleResult

Treats url as the URL to a file containing an Oz pickle, and returns the result of attempting to un-pickle that file. Used by the Gate class.

— Method on Storage: writePickleToFile file value

Writes the given value, as an Oz pickle, to the file given. The file is stripped of “/” and “\” characters, and placed under the “pickle” directory under the server's root directory.

— Method on Storage: getCapabilitiesFromOzName ozName capabilities

Returns a full set of capabilities for the object associated with the ozName given.

— Method on Storage: getObjectFromOzName ozName objectRef

Returns an object refrence, including a full set of capabilities, for the object associated with the ozName given.

— Method on Storage: getObjectFromFileNum fileNum objectRef

Returns an object refrence, including a full set of capabilities, for the object associated with the file number given. Please don't use this.

— Method on Storage: upgradeObject objectRef className

Forces an upgrade of the object in question.

— Method on Storage: upgradeAll done

Upgrades *all* objects in the MOZ. Well, OK, all the ones Storage knows about (which is everything but special user-created stuff, for which you're on your own).

— Method on Storage: createClass className controlRef result

Creates a ClassControl object for the given className, after checking that no such class already exists, and returns a reference to the new object in controlRef.

— Method on Storage: writeClassFile className string result

Writes the class file associated with the given className using the string given as the entire text of the class file.

— Method on Storage: loadClass className

Recompiles the class named className. Not that the actual compilation is threaded off.