bes  Updated for version 3.20.6
BESDefinitionStorageList Class Reference

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

#include <BESDefinitionStorageList.h>

Collaboration diagram for BESDefinitionStorageList:
Collaboration graph

Public Member Functions

virtual bool add_persistence (BESDefinitionStorage *p)
 Add a persistent store to the list. More...
 
virtual bool deref_persistence (const std::string &persist_name)
 de-reference a persistent store in the list More...
 
virtual void dump (std::ostream &strm) const
 dumps information about this object More...
 
virtual BESDefinitionStoragefind_persistence (const std::string &persist_name)
 find the persistence store with the given name More...
 
virtual BESDefinelook_for (const std::string &def_name)
 look for the specified definition in the list of defintion stores. More...
 
virtual bool ref_persistence (const std::string &persist_name)
 reference a persistent store in the list More...
 
virtual void show_definitions (BESInfo &info)
 show information for each definition in each persistence store More...
 

Static Public Member Functions

static BESDefinitionStorageListTheList ()
 

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 69 of file BESDefinitionStorageList.h.

Member Function Documentation

◆ add_persistence()

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
cppersistent store to add to the list
Returns
true if successfully added, false otherwise
See also
BESDefinitionStorage

Definition at line 76 of file BESDefinitionStorageList.cc.

◆ deref_persistence()

bool BESDefinitionStorageList::deref_persistence ( const std::string &  persist_name)
virtual

de-reference a persistent store in the list

De-reference the specified store in the list. If this is the last reference then the definition store is removed from the list and deleted.

Parameters
persist_namename of the persistent store to be de-referenced
Returns
true if successfully de-referenced, false if not found
See also
BESDefinitionStorage

Definition at line 155 of file BESDefinitionStorageList.cc.

◆ dump()

void BESDefinitionStorageList::dump ( std::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
strmC++ i/o stream to dump the information to

Implements BESObj.

Definition at line 307 of file BESDefinitionStorageList.cc.

◆ find_persistence()

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

find the persistence store with the given name

Returns the persistence store with the given name

Parameters
persist_namename of the persistent store to be found
Returns
the persistence store BESDefinitionStorage
See also
BESDefinitionStorage

Definition at line 203 of file BESDefinitionStorageList.cc.

◆ look_for()

BESDefine * BESDefinitionStorageList::look_for ( const std::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_namename of the definition to find
Returns
defintion with the given name, null otherwise
See also
BESDefinitionStorage
BESDefine

Definition at line 236 of file BESDefinitionStorageList.cc.

◆ ref_persistence()

bool BESDefinitionStorageList::ref_persistence ( const std::string &  persist_name)
virtual

reference a persistent store in the list

Informs the list that there is a reference to a definition store

Parameters
persist_namename of the persistent store to be referenced
Returns
true if successfully referenced, false if not found
See also
BESDefinitionStorage

Definition at line 120 of file BESDefinitionStorageList.cc.

◆ show_definitions()

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
infoobject to store the definition and persistent store information
See also
BESInfo

Definition at line 272 of file BESDefinitionStorageList.cc.


The documentation for this class was generated from the following files: