Run-Time Options
[SHORE Storage Manager Application Programming Interface (SSM API)]

Collaboration diagram for Run-Time Options:


Detailed Description

The storage manager has run-time options. Some of them must be set (they do not have defaults), so we provide this run-time options-control package that can be used by the server to set the values for options (both with and without defaults).

This package makes it easy for values to be set and read in one or more of these ways:

A server creates is options (required and optional) with their default values, and the server then adds the storage manager's options to the collected set of "known" options.

Subsequently, the configuration file(s) may be scanned and the command line by the options-package code to find values for any of the known options.

All this is must be done before a storage manager is started up, so that the values are available to the storage manager. Before starting up the storage manager, the server should also determine if all required options have values, and this package helps in that regard as well.

This is all achieved with the following three classes: option_t, option_group_t, and option_file_scan_t.

Objects of type option_t contain information about individual options. An option has a string name and an assigned value. It might also have a default value. It is either "required" or "optional".

An option_group_t manages a related group of options. The group has its own "class name", which is a set of appended names. This allows hierarchical grouping of options. (The original SHORE code had many more layers and libraries, including client and server components, so this was useful. A full-blown RDBMS built on the storage manager might also make use of this hierarchical grouping.)

An option_file_scan_t is parses a file containing option name-value assignments.

An option_stream_scan_t does the same for an input stream.

The example startstop::cpp shows how options are used in a minimal way.

The example consisting of create_rec::cpp and init_config_options::cpp is more complete.


Modules

 List of Run-Time Options

Classes

class  option_t
 A single run-time option (e.g., from a .rc file). See Run-Time Options. More...
class  option_group_t
 Group of option_t. See Run-Time Options. More...
class  option_stream_scan_t
 Enables scanning of options group. See Run-Time Options. More...
class  option_file_scan_t
 Scan a text file for options. See Run-Time Options. More...


Generated on Wed Jul 7 17:22:34 2010 for Shore Storage Manager by  doxygen 1.4.7