bes
Updated for version 3.20.6
|
implementation of BESContainerStorage that stores containers in memory for the duration of this process. More...
#include <BESContainerStorageVolatile.h>
Public Types | |
typedef std::map< std::string, BESContainer * >::const_iterator | Container_citer |
typedef std::map< std::string, BESContainer * >::iterator | Container_iter |
Public Member Functions | |
virtual void | add_container (const std::string &sym_name, const std::string &real_name, const std::string &type) |
add a file container to the volatile list. The container's realname represents the path to a data file in the file system. More... | |
BESContainerStorageVolatile (const std::string &n) | |
create an instance of this persistent store with the given name. More... | |
virtual bool | del_container (const std::string &s_name) |
removes a container with the given symbolic name from the list and deletes it. More... | |
virtual bool | del_containers () |
removes all container More... | |
virtual void | dump (std::ostream &strm) const |
dumps information about this object More... | |
virtual const std::string & | get_name () const |
retrieve the name of this persistent store More... | |
virtual bool | isData (const std::string &inQuestion, std::list< std::string > &provides) |
determine if the given container is data and what servies are available for it More... | |
virtual BESContainer * | look_for (const std::string &sym_name) |
looks for the specified container using the symbolic name passed More... | |
virtual void | show_containers (BESInfo &info) |
show information for each container in this persistent store More... | |
Protected Member Functions | |
virtual void | add_container (BESContainer *c) |
add the passed container to the list of containers in volatile storage More... | |
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 More... | |
Protected Attributes | |
bool | _follow_sym_links |
std::string | _my_name |
std::string | _root_dir |
implementation of BESContainerStorage that stores containers in memory for the duration of this process.
This implementation of BESContainerStorage stores volatile containers in memory for the duration of this process. A list of containers is stored in the object. The look_for method simply looks for the specified symbolic name in the list of containers and returns if a match is found. Containers can be added to this instance as long as the symbolic name doesn't already exist.
Definition at line 57 of file BESContainerStorageVolatile.h.
BESContainerStorageVolatile::BESContainerStorageVolatile | ( | const std::string & | n | ) |
create an instance of this persistent store with the given name.
Creates an instances of BESContainerStorageVolatile with the given name.
n | name of this persistent store |
Definition at line 62 of file BESContainerStorageVolatile.cc.
|
protectedvirtual |
add the passed container to the list of containers in volatile storage
This method adds the passed container to the list of volatile containers. The passed container is owned by the list if added and should not be deleted by the caller.
If a container with the symbolic name of the passed container is already in the list then an exception is thrown.
c | container to add to the list |
BESContainerStorageExcpetion | if the passed container is null |
BESContainerStorageExcpetion | if no type is specified in the passed container |
BESContainerStorageExcpetion | if a container with the passed symbolic name already exists. |
Implements BESContainerStorage.
Definition at line 183 of file BESContainerStorageVolatile.cc.
|
virtual |
add a file container to the volatile list. The container's realname represents the path to a data file in the file system.
If a container other than a BESFileContainer is to be added to the list then a derived class of BESContainerStorageVolatile should call the protected add_container method that takes an already built container. This method adds a container represented by a data file.
sym_name | symbolic name of the container being created |
real_name | The real name of the container, as provided by the user/client. This name is relative to the BES Data Root Directory |
type | type of data represented by this container |
BESInternalError | if no type is specified |
BESInternalError | if a container with the passed symbolic name already exists. |
Implements BESContainerStorage.
Reimplemented in BESFileContainerStorage, cmr::CmrContainerStorage, gateway::GatewayContainerStorage, and httpd_catalog::HttpdCatalogContainerStorage.
Definition at line 128 of file BESContainerStorageVolatile.cc.
|
virtual |
removes a container with the given symbolic name from the list and deletes it.
s_name | symbolic name for the container |
Implements BESContainerStorage.
Definition at line 208 of file BESContainerStorageVolatile.cc.
|
virtual |
removes all container
This method removes all containers from the persistent store. It does not delete the real data behind the container.
Implements BESContainerStorage.
Definition at line 230 of file BESContainerStorageVolatile.cc.
|
virtual |
dumps information about this object
Displays the pointer value of this instance along with information about the containers stored in this volatile list.
strm | C++ i/o stream to dump the information to |
Implements BESContainerStorage.
Reimplemented in BESFileContainerStorage, cmr::CmrContainerStorage, gateway::GatewayContainerStorage, and httpd_catalog::HttpdCatalogContainerStorage.
Definition at line 303 of file BESContainerStorageVolatile.cc.
|
inlinevirtualinherited |
retrieve the name of this persistent store
Definition at line 91 of file BESContainerStorage.h.
|
virtual |
determine if the given container is data and what servies are available for it
inQuestion | the container in question |
provides | an output parameter for storing the list of services provided for this container |
Implements BESContainerStorage.
Reimplemented in BESFileContainerStorage.
Definition at line 250 of file BESContainerStorageVolatile.cc.
|
virtual |
looks for the specified container using the symbolic name passed
If a match is made with the symbolic name then the stored container is duplicated and returned to the user. If not, 0 is returned.
sym_name | symbolic name of the container to look for |
Implements BESContainerStorage.
Definition at line 98 of file BESContainerStorageVolatile.cc.
|
protectedvirtualinherited |
add information for a container to the informational response object
sym_name | symbolic name of the container to add |
real_name | real name, e.g. file name, of the container to add |
type | data type of the container |
info | The BES information object to add container information to |
Definition at line 48 of file BESContainerStorage.cc.
|
virtual |
show information for each container in this persistent store
For each container in this persistent store, add information about each of those containers. The information added to the information object includes a line for each container within this persistent store which includes the symbolic name, the real name, and the data type, separated by commas.
In the case of this persistent store information from each container added to the volatile list is added to the information object.
info | object to store the container and persistent store information |
Implements BESContainerStorage.
Definition at line 276 of file BESContainerStorageVolatile.cc.