OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
Provides a mechanism for accessing container information from different container stores registered with this server. More...
#include <BESContainerStorageList.h>
Classes | |
struct | _persistence_list |
Public Member Functions | |
virtual bool | add_persistence (BESContainerStorage *p) |
Add a persistent store to the list. | |
virtual bool | deref_persistence (const string &persist_name) |
dereference a persistent store in the list. | |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
virtual BESContainerStorage * | find_persistence (const string &persist_name) |
find the persistence store with the given name | |
virtual BESContainer * | look_for (const string &sym_name) |
look for the specified container information in the list of persistent stores. | |
virtual bool | ref_persistence (const string &persist_name) |
refence the specified persistent store if in the list | |
virtual void | show_containers (BESInfo &info) |
show information for each container in each persistence store | |
virtual | ~BESContainerStorageList () |
Static Public Member Functions | |
static BESContainerStorageList * | TheList () |
Protected Member Functions | |
BESContainerStorageList () |
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 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.
Definition at line 67 of file BESContainerStorageList.h.
|
protected |
Definition at line 47 of file BESContainerStorageList.cc.
Referenced by TheList().
|
virtual |
Definition at line 52 of file BESContainerStorageList.cc.
|
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.
cp | persistent store to add to the list |
Definition at line 80 of file BESContainerStorageList.cc.
References BESContainerStorage::get_name().
Referenced by DapModule::initialize(), and BESDefaultModule::initialize().
|
virtual |
dereference a persistent store in the list.
de-reference the names persistent store. If found, the reference on the catalog is decremented and true is returned. If the reference reaches zero then the catalog is removed. If not found then false is returned.
persist_name | name of the persistent store to be de-referenced |
Definition at line 177 of file BESContainerStorageList.cc.
Referenced by DapModule::terminate(), and BESDefaultModule::terminate().
|
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.
strm | C++ i/o stream to dump the information to |
Implements BESObj.
Definition at line 378 of file BESContainerStorageList.cc.
References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
|
virtual |
find the persistence store with the given name
Returns the persistence store with the given name
persist_name | name of the persistent store to be found |
Definition at line 235 of file BESContainerStorageList.cc.
Referenced by BESDelContainerResponseHandler::execute(), BESDelContainersResponseHandler::execute(), and BESSetContainerResponseHandler::execute().
|
virtual |
look for the specified container information in the list of persistent stores.
Look for the container with the specified symbolic name in the BESContainerStorage instances. The first to find it wins.
If the container information is not found then, depending on the value of the key BES.Container.Persistence in the bes configuration file, an exception is thrown or it is logged to the bes log file that it was not found. If the key is set to Nice, nice, or NICE then information is logged to the bes log file stating that the container information was not found.
sym_name | symbolic name of the container to look for |
BESSyntaxUserError | if container not found and strict set in the bes configuration file for BES.Container.Persistence |
Definition at line 301 of file BESContainerStorageList.cc.
References BESLog::TheLog().
Referenced by BESXMLDefineCommand::prep_request().
|
virtual |
refence the specified persistent store if in the list
Increments the reference count of the persistent store in the list. This lets the system know that there is a module that is referencing the specified catalog
persist_name | name of the persistent store to be referenced |
Definition at line 134 of file BESContainerStorageList.cc.
|
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.
info | object to store the container and persistent store information |
Definition at line 356 of file BESContainerStorageList.cc.
References BESInfo::begin_tag(), and BESInfo::end_tag().
Referenced by BESShowContainersResponseHandler::execute().
|
static |
Definition at line 403 of file BESContainerStorageList.cc.
References BESContainerStorageList().
Referenced by BESDelContainerResponseHandler::execute(), BESDelContainersResponseHandler::execute(), BESShowContainersResponseHandler::execute(), BESSetContainerResponseHandler::execute(), DapModule::initialize(), BESDefaultModule::initialize(), BESXMLDefineCommand::prep_request(), DapModule::terminate(), and BESDefaultModule::terminate().