54 BESContainerStorageList::persistence_list *pl = _first;
56 if (pl->_persistence_obj) {
57 delete pl->_persistence_obj;
59 BESContainerStorageList::persistence_list *next = pl->_next;
81 _first =
new BESContainerStorageList::persistence_list;
82 _first->_persistence_obj = cp;
83 _first->_reference = 1;
88 BESContainerStorageList::persistence_list *pl = _first;
90 while (done ==
false) {
91 if (pl->_persistence_obj->get_name() != cp->
get_name()) {
96 pl->_next =
new BESContainerStorageList::persistence_list;
97 pl->_next->_reference = 1;
98 pl->_next->_persistence_obj = cp;
126 BESContainerStorageList::persistence_list *pl = _first;
129 while (done ==
false) {
131 if (pl->_persistence_obj && pl->_persistence_obj->get_name() == persist_name) {
162 BESContainerStorageList::persistence_list *pl = _first;
163 BESContainerStorageList::persistence_list *last = 0;
166 while (done ==
false) {
168 if (pl->_persistence_obj && pl->_persistence_obj->get_name() == persist_name) {
172 if (!pl->_reference) {
174 _first = _first->_next;
178 throw BESInternalError(
"ContainerStorageList last is null", __FILE__, __LINE__);
179 last->_next = pl->_next;
181 delete pl->_persistence_obj;
211 BESContainerStorageList::persistence_list *pl = _first;
213 while (done ==
false) {
215 if (persist_name == pl->_persistence_obj->get_name()) {
216 ret = pl->_persistence_obj;
233 string key =
"BES.Container.Persistence";
237 if (isnice ==
"Nice" || isnice ==
"nice" || isnice ==
"NICE")
271 BESContainerStorageList::persistence_list *pl = _first;
273 while (done ==
false) {
275 ret_container = pl->_persistence_obj->look_for(sym_name);
287 if (!ret_container) {
289 (*
BESLog::TheLog()) <<
"Could not find the symbolic name " << sym_name << endl;
292 string s = (string)
"Could not find the symbolic name " + sym_name;
297 return ret_container;
314 BESContainerStorageList::persistence_list *pl = _first;
316 map<string, string> props;
317 props[
"name"] = pl->_persistence_obj->get_name();
319 pl->_persistence_obj->show_containers(info);
334 strm <<
BESIndent::LMarg <<
"BESContainerStorageList::dump - (" << (
void *)
this <<
")" << endl;
336 BESContainerStorageList::persistence_list *pl = _first;
341 pl->_persistence_obj->dump(strm);
355 if (_instance == 0) {
virtual ~BESContainerStorageList()
provides persistent storage for data storage information represented by a container.
exception thrown if inernal error encountered
virtual BESContainerStorage * find_persistence(const string &persist_name)
find the persistence store with the given name
virtual bool add_persistence(BESContainerStorage *p)
Add a persistent store to the list.
error thrown if there is a user syntax error in the request or any other user error ...
virtual bool ref_persistence(const string &persist_name)
refence the specified persistent store if in the list
virtual void dump(ostream &strm) const
dumps information about this object
informational response object
Provides a mechanism for accessing container information from different container stores registered w...
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
static ostream & LMarg(ostream &strm)
virtual bool deref_persistence(const string &persist_name)
dereference a persistent store in the list.
BESContainerStorageList()
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
virtual BESContainer * look_for(const string &sym_name)
look for the specified container information in the list of persistent stores.
static BESContainerStorageList * TheList()
A container is something that holds data.
virtual void show_containers(BESInfo &info)
show information for each container in each persistence store
static BESKeys * TheKeys()
virtual const string & get_name() const
retrieve the name of this persistent store
virtual void end_tag(const string &tag_name)