BESContainerStorage Class Reference

provides persistent storage for data storage information represented by a symbolic name. More...

#include <BESContainerStorage.h>

Inheritance diagram for BESContainerStorage:

Inheritance graph
[legend]
Collaboration diagram for BESContainerStorage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BESContainerStorage (const string &name)
 create an instance of BESContainerStorage with the give name.
virtual ~BESContainerStorage ()
virtual const string & get_name () const
 retrieve the name of this persistent store
virtual void look_for (BESContainer &d)=0
 looks for a container in this persistent store
virtual void add_container (const string &s_name, const string &r_name, const string &type)=0
 adds a container with the provided information
virtual bool del_container (const string &s_name)=0
 removes a container with the given symbolic name
virtual bool del_containers ()=0
 removes all container
virtual void show_containers (BESInfo &info)=0
 show the containers stored in this persistent store
virtual void dump (ostream &strm) const =0
 Displays debug information about this object.

Protected Attributes

string _my_name

Detailed Description

provides persistent storage for data storage information represented by a symbolic name.

An implementation of the abstract interface BESContainerStorage provides storage for information about accessing data of different types. The information is represented by a symbolic name. A user can request a symbolic name that represents a certain data file of a certain data type. For example, a symbolic name 'nc1' could represent the netcdf file /usr/apache/htdocs/netcdf/datfile01.cdf.

An instance of a derived implementation has a name associated with it, in case that there are multiple ways in which the information can be stored. For example, the main persistent storage for containers could be a mysql database, but a user could store temporary information in different files. If the user wishes to remove one of these persistence stores they would request that a named BESContainerStorage object be removed from the list.

See also:
BESContainer

BESContainerStorageList

Definition at line 66 of file BESContainerStorage.h.


Constructor & Destructor Documentation

BESContainerStorage::BESContainerStorage ( const string &  name  )  [inline]

create an instance of BESContainerStorage with the give name.

Parameters:
name name of this persistence store

Definition at line 77 of file BESContainerStorage.h.

virtual BESContainerStorage::~BESContainerStorage (  )  [inline, virtual]

Definition at line 80 of file BESContainerStorage.h.


Member Function Documentation

virtual const string& BESContainerStorage::get_name (  )  const [inline, virtual]

retrieve the name of this persistent store

Returns:
name of this persistent store.

Definition at line 86 of file BESContainerStorage.h.

References _my_name.

Referenced by BESContainerStorageList::add_persistence(), BESContainerStorageVolatile::dump(), BESContainerStorageFile::dump(), BESContainerStorageCatalog::dump(), BESContainerStorageVolatile::show_containers(), and BESContainerStorageFile::show_containers().

virtual void BESContainerStorage::look_for ( BESContainer d  )  [pure virtual]

looks for a container in this persistent store

This method looks for a container with the name specified in the given container and fills in the information in the given container.

Parameters:
d The container to look for and, if found, the information is filled in.

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

virtual void BESContainerStorage::add_container ( const string &  s_name,
const string &  r_name,
const string &  type 
) [pure virtual]

adds a container with the provided information

This method adds a container to the persistence store with the specified information.

Parameters:
s_name symbolic name for the container
r_name real name for the container
type type of data represented by this container

Implemented in BESContainerStorageCatalog, BESContainerStorageFile, and BESContainerStorageVolatile.

Referenced by BESSetContainerResponseHandler::execute().

virtual bool BESContainerStorage::del_container ( const string &  s_name  )  [pure virtual]

removes a container with the given symbolic name

This method removes a container to the persistence store with the given symbolic name. It deletes the container.

Parameters:
s_name symbolic name for the container
Returns:
true if successfully removed and false otherwise

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

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

virtual bool BESContainerStorage::del_containers (  )  [pure virtual]

removes all container

This method removes all containers from the persistent store. It does not delete the real data behind the container.

Returns:
true if successfully removed and false otherwise

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

Referenced by BESDelContainersResponseHandler::execute().

virtual void BESContainerStorage::show_containers ( BESInfo info  )  [pure virtual]

show the containers stored in this persistent store

Add information to the passed information object about each of the containers stored within this persistent store. The information added to the passed information objects includes the name of this persistent store on the first line followed by the symbolic name, real name and data type for each container, one per line.

Parameters:
info information object to store the information in

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

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

Displays debug information about this object.

Parameters:
strm output stream to use to dump the contents of this object

Implements BESObj.

Implemented in BESContainerStorageCatalog, BESContainerStorageFile, and BESContainerStorageVolatile.


Member Data Documentation

string BESContainerStorage::_my_name [protected]

Definition at line 69 of file BESContainerStorage.h.

Referenced by get_name().


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