BESDefinitionStorageList Class Reference

Provides a mechanism for accessing definitions from different definition stores registered with this server. More...

#include <BESDefinitionStorageList.h>

Inheritance diagram for BESDefinitionStorageList:

Inheritance graph
[legend]
Collaboration diagram for BESDefinitionStorageList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~BESDefinitionStorageList ()
virtual bool add_persistence (BESDefinitionStorage *p)
 Add a persistent store to the list.
virtual bool del_persistence (const string &persist_name)
 remove a persistent store from the list
virtual BESDefinitionStoragefind_persistence (const string &persist_name)
 find the persistence store with the given name
virtual BESDefinelook_for (const string &def_name)
 look for the specified definition in the list of defintion stores.
virtual void show_definitions (BESInfo &info)
 show information for each definition in each persistence store
virtual void dump (ostream &strm) const
 dumps information about this object

Static Public Member Functions

static BESDefinitionStorageListTheList ()

Protected Member Functions

 BESDefinitionStorageList ()

Classes

struct  _persistence_list

Detailed Description

Provides a mechanism for accessing definitions from different definition stores registered with this server.

This class provides a mechanism for users to access definitions from different definition stores, such as from a MySQL database, a file, or volatile stores.

Users can add different BESDefinitionStorage instances to this persistent list. Then, when a user looks for a definition, that search goes through the list of persistent stores in the order they were added to this list.

See also:
BESDefinitionStorage

BESDefine

BESDefinitionStorageException

Definition at line 64 of file BESDefinitionStorageList.h.


Constructor & Destructor Documentation

BESDefinitionStorageList::BESDefinitionStorageList (  )  [protected]

Definition at line 45 of file BESDefinitionStorageList.cc.

BESDefinitionStorageList::~BESDefinitionStorageList (  )  [virtual]

Definition at line 50 of file BESDefinitionStorageList.cc.


Member Function Documentation

bool BESDefinitionStorageList::add_persistence ( BESDefinitionStorage cp  )  [virtual]

Add a persistent store to the list.

Each persistent store has a name. If a persistent store already exists in the list with that name then the persistent store is not added. Otherwise the store is added to the list.

The persistent stores are searched in the order in which they were added.

Parameters:
cp persistent store to add to the list
Returns:
true if successfully added, false otherwise
See also:
BESDefinitionStorage

Definition at line 78 of file BESDefinitionStorageList.cc.

References BESDefinitionStorage::get_name().

Referenced by BESDefaultModule::initialize(), and defT::run().

Here is the call graph for this function:

bool BESDefinitionStorageList::del_persistence ( const string &  persist_name  )  [virtual]

remove a persistent store from the list

Removes the named persistent store from the list.

Parameters:
persist_name name of the persistent store to be removed
Returns:
true if successfully removed, false otherwise
See also:
BESDefinitionStorage

Definition at line 128 of file BESDefinitionStorageList.cc.

Referenced by BESDefaultModule::terminate().

BESDefinitionStorage * BESDefinitionStorageList::find_persistence ( const string &  persist_name  )  [virtual]

find the persistence store with the given name

Returns the persistence store with the given name

Parameters:
persist_name name of the persistent store to be found
Returns:
the persistence store BESDefinitionStorage
See also:
BESDefinitionStorage

Definition at line 178 of file BESDefinitionStorageList.cc.

Referenced by BESDelDefsResponseHandler::execute(), BESDelDefResponseHandler::execute(), BESDefineResponseHandler::execute(), and defT::run().

BESDefine * BESDefinitionStorageList::look_for ( const string &  def_name  )  [virtual]

look for the specified definition in the list of defintion stores.

Looks for a definition with the given name in the order in which definition stores were added to the definition storage list.

Parameters:
def_name name of the definition to find
Returns:
defintion with the given name, null otherwise
See also:
BESDefinitionStorage

BESDefine

Definition at line 216 of file BESDefinitionStorageList.cc.

Referenced by BESGetCommand::parse_request().

void BESDefinitionStorageList::show_definitions ( BESInfo info  )  [virtual]

show information for each definition in each persistence store

For each definition in each persistent store, add infomation about each of those definitions. The information added to the information object includes the persistent store name, in the order the persistent stores are searched, followed by a line for each definition within that persistent store which includes the name of the definition, information about each container used by that definition, the aggregation server being used and the aggregation command being used if aggregation is specified.

Parameters:
info object to store the definition and persistent store information
See also:
BESInfo

Definition at line 258 of file BESDefinitionStorageList.cc.

References BESInfo::add_break(), BESInfo::begin_tag(), and BESInfo::end_tag().

Referenced by BESShowDefsResponseHandler::execute().

Here is the call graph for this function:

void BESDefinitionStorageList::dump ( ostream &  strm  )  const [virtual]

dumps information about this object

Displays the pointer value of this instance along with the list of definition storage instaces registered with the list.

Parameters:
strm C++ i/o stream to dump the information to

Implements BESObj.

Definition at line 295 of file BESDefinitionStorageList.cc.

References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Here is the call graph for this function:

BESDefinitionStorageList * BESDefinitionStorageList::TheList (  )  [static]

Definition at line 278 of file BESDefinitionStorageList.cc.

Referenced by BESShowDefsResponseHandler::execute(), BESDelDefsResponseHandler::execute(), BESDelDefResponseHandler::execute(), BESDefineResponseHandler::execute(), BESDefaultModule::initialize(), BESGetCommand::parse_request(), defT::run(), and BESDefaultModule::terminate().


The documentation for this class was generated from the following files:
Generated on Wed Aug 29 03:18:53 2007 for OPeNDAP Back End Server (BES) by  doxygen 1.5.2