BESContainerStorageList Class Reference

Provides a mechanism for accessing container information from different container stores registered with this server. More...

#include <BESContainerStorageList.h>

Inheritance diagram for BESContainerStorageList:

Inheritance graph
[legend]
Collaboration diagram for BESContainerStorageList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~BESContainerStorageList ()
virtual bool add_persistence (BESContainerStorage *p)
 Add a persistent store to the list.
virtual bool del_persistence (const string &persist_name)
 remove a persistent store from the list
virtual BESContainerStoragefind_persistence (const string &persist_name)
 find the persistence store with the given name
virtual void look_for (BESContainer &d)
 look for the specified container information in the list of persistent stores.
virtual void show_containers (BESInfo &info)
 show information for each container in each persistence store
virtual void dump (ostream &strm) const
 dumps information about this object

Static Public Member Functions

static BESContainerStorageListTheList ()

Protected Member Functions

 BESContainerStorageList ()

Classes

struct  _persistence_list

Detailed Description

Provides a mechanism for accessing container information from different container stores registered with this server.

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

Users can add different BESContainerStorage instances to this persistent list. Then, when a user looks for a symbolic name, that search goes through the list of persistent stores in order.

If the symbolic name is found then it is the responsibility of the BESContainerStorage instances to fill in the container information in the specified BESContainer object.

If the symbolic name is not found then a flag is checked to determine whether to simply log the fact that the symbolic name was not found, or to throw an exception of type BESContainerStorageException.

See also:
BESContainerStorage

BESContainer

BESContainerStorageException

Definition at line 71 of file BESContainerStorageList.h.


Constructor & Destructor Documentation

BESContainerStorageList::BESContainerStorageList (  )  [protected]

Definition at line 47 of file BESContainerStorageList.cc.

BESContainerStorageList::~BESContainerStorageList (  )  [virtual]

Definition at line 52 of file BESContainerStorageList.cc.


Member Function Documentation

bool BESContainerStorageList::add_persistence ( BESContainerStorage 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:
BESContainerStorage

Definition at line 80 of file BESContainerStorageList.cc.

References BESContainerStorage::get_name().

Referenced by BESDefaultModule::initialize(), plistT::run(), and containerT::run().

Here is the call graph for this function:

bool BESContainerStorageList::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:
BESContainerStorage

Definition at line 130 of file BESContainerStorageList.cc.

Referenced by plistT::run(), and BESDefaultModule::terminate().

BESContainerStorage * BESContainerStorageList::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 BESContainerStorage
See also:
BESContainerStorage

Definition at line 180 of file BESContainerStorageList.cc.

Referenced by BESSetContainerResponseHandler::execute(), BESDelContainersResponseHandler::execute(), and BESDelContainerResponseHandler::execute().

void BESContainerStorageList::look_for ( BESContainer d  )  [virtual]

look for the specified container information in the list of persistent stores.

If the container information is found in one of the BESContainerStorage instances then it is the responsibility of that instance to fill in the container information in the BESContainer instances passed.

If the container information is not found then, depending on the value of the key BES.Container.Persistence in the dods initiailization file, an exception is thrown or it is logged to the dods log file that it was not found. If the key is set to Nice, nice, or NICE then information is logged to the dods log file stating that the container information was not found.

Parameters:
d container information to look for and, if found, to store the container information in.
See also:
BESContainerStorage

BESContainer

BESKeys

BESLog

Definition at line 243 of file BESContainerStorageList.cc.

References BESContainer::get_symbolic_name(), BESContainer::is_valid(), and BESLog::TheLog().

Referenced by BESDefineCommand::parse_request(), plistT::run(), and containerT::run().

Here is the call graph for this function:

void BESContainerStorageList::show_containers ( BESInfo info  )  [virtual]

show information for each container in each persistence store

For each container in each persistent store, add infomation about each of those containers. The information added to the information object includes the persistent store information, in the order the persistent stores are searched for a container, followed by a line for each container within that persistent store which includes the symbolic name, the real name, and the data type, separated by commas.

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

Definition at line 295 of file BESContainerStorageList.cc.

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

Referenced by BESShowContainersResponseHandler::execute(), and plistT::run().

Here is the call graph for this function:

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

dumps information about this object

Displays the pointer value of this instance along with information about the container storage objects stored in this list.

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

Implements BESObj.

Definition at line 315 of file BESContainerStorageList.cc.

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

Here is the call graph for this function:

BESContainerStorageList * BESContainerStorageList::TheList (  )  [static]

Definition at line 340 of file BESContainerStorageList.cc.

Referenced by BESShowContainersResponseHandler::execute(), BESSetContainerResponseHandler::execute(), BESDelContainersResponseHandler::execute(), BESDelContainerResponseHandler::execute(), BESDefaultModule::initialize(), BESDefineCommand::parse_request(), plistT::run(), containerT::run(), and BESDefaultModule::terminate().


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