bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
BESContainerStorage Class Referenceabstract

provides persistent storage for data storage information represented by a container. More...

#include <BESContainerStorage.h>

Inheritance diagram for BESContainerStorage:
Inheritance graph
Collaboration diagram for BESContainerStorage:
Collaboration graph

Public Member Functions

virtual void add_container (BESContainer *c)=0
 Add a container to the store.
 
virtual void add_container (const std::string &sym_name, const std::string &real_name, const std::string &type)=0
 adds a container with the provided information
 
 BESContainerStorage (const std::string &name)
 create an instance of BESContainerStorage with the given name.
 
virtual bool del_container (const std::string &s_name)=0
 removes a container with the given symbolic name
 
virtual bool del_containers ()=0
 removes all container
 
virtual void dump (std::ostream &strm) const =0
 Displays debug information about this object.
 
virtual const std::string & get_name () const
 retrieve the name of this persistent store
 
virtual bool isData (const std::string &inQuestion, std::list< std::string > &provides)=0
 determine if the given container is data and what services are available for it
 
virtual BESContainerlook_for (const std::string &sym_name)=0
 looks for a container in this persistent store
 
virtual void show_containers (BESInfo &info)=0
 show the containers stored in this persistent store
 

Protected Member Functions

virtual void show_container (const std::string &sym_name, const std::string &real_name, const std::string &type, BESInfo &info)
 add information for a container to the informational response object
 

Protected Attributes

std::string _my_name
 

Detailed Description

provides persistent storage for data storage information represented by a container.

An implementation of the abstract interface BESContainerStorage provides storage for information about accessing data of different data types. The information is represented by a symbolic name. A user can request a symbolic name that represents a certain container.

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 67 of file BESContainerStorage.h.

Constructor & Destructor Documentation

◆ BESContainerStorage()

BESContainerStorage::BESContainerStorage ( const std::string & name)
inline

create an instance of BESContainerStorage with the given name.

Parameters
namename of this persistence store

Definition at line 78 of file BESContainerStorage.h.

◆ ~BESContainerStorage()

virtual BESContainerStorage::~BESContainerStorage ( )
inlinevirtual

Definition at line 83 of file BESContainerStorage.h.

Member Function Documentation

◆ add_container() [1/2]

virtual void BESContainerStorage::add_container ( BESContainer * c)
pure virtual

Add a container to the store.

Parameters
c

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

◆ add_container() [2/2]

virtual void BESContainerStorage::add_container ( const std::string & sym_name,
const std::string & real_name,
const std::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
sym_nameThe symbolic name for the container
real_nameThe real name for the container
typeThe type of data held by this container. This is the handler that can be used to read the data
Deprecated

Implemented in BESContainerStorageFile, BESContainerStorageVolatile, BESFileContainerStorage, builddmrpp::NgapBuildDmrppContainerStorage, cmr::CmrContainerStorage, gateway::GatewayContainerStorage, httpd_catalog::HttpdCatalogContainerStorage, ngap::NgapOwnedContainerStorage, and s3::S3ContainerStorage.

◆ del_container()

virtual bool BESContainerStorage::del_container ( const std::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_namesymbolic name for the container
Returns
true if successfully removed and false otherwise

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

◆ del_containers()

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.

◆ dump()

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

◆ get_name()

virtual const std::string & BESContainerStorage::get_name ( ) const
inlinevirtual

retrieve the name of this persistent store

Returns
name of this persistent store.

Definition at line 91 of file BESContainerStorage.h.

◆ isData()

virtual bool BESContainerStorage::isData ( const std::string & inQuestion,
std::list< std::string > & provides )
pure virtual

determine if the given container is data and what services are available for it

Parameters
inQuestionthe container in question
providesan output parameter for storing the list of services provided for this container

Implemented in BESContainerStorageFile, BESContainerStorageVolatile, and BESFileContainerStorage.

◆ look_for()

virtual BESContainer * BESContainerStorage::look_for ( const std::string & sym_name)
pure virtual

looks for a container in this persistent store

This method looks for a container with the given symbolic name.

Parameters
sym_nameThe symbolic name of the container to look for
Returns
If sym_name is found, the BESContainer instance representing that symbolic name, else NULL is returned.

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

◆ show_container()

void BESContainerStorage::show_container ( const std::string & sym_name,
const std::string & real_name,
const std::string & type,
BESInfo & info )
protectedvirtual

add information for a container to the informational response object

Parameters
sym_namesymbolic name of the container to add
real_namereal name, e.g. file name, of the container to add
typedata type of the container
infoThe BES information object to add container information to
See also
BESInfo

Definition at line 48 of file BESContainerStorage.cc.

◆ show_containers()

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
infoinformation object to store the information in

Implemented in BESContainerStorageFile, and BESContainerStorageVolatile.

Member Data Documentation

◆ _my_name

std::string BESContainerStorage::_my_name
protected

Definition at line 69 of file BESContainerStorage.h.


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