#include <DurableStore.h>
Inheritance diagram for oasys::DurableStoreImpl:

Definition at line 111 of file DurableStore.h.
Public Types | |
| typedef std::map< std::string, int > | RefCountMap |
| Map used for ref counting tables. | |
| typedef std::vector< SerializableObject * > | PrototypeVector |
| Typedef for the list of objects passed to get_table. | |
Public Member Functions | |
| DurableStoreImpl (const char *classname, const char *logpath) | |
| Constructor (initializes the log path). | |
| virtual | ~DurableStoreImpl () |
| Destructor. | |
| virtual int | init (const StorageConfig &config)=0 |
| virtual int | get_table (DurableTableImpl **table, const std::string &db_name, int flags, PrototypeVector &prototypes)=0 |
| Hook to get or create the implementation-specific components of a durable table. | |
| virtual int | del_table (const std::string &db_name)=0 |
| Hook to remove a table (by name) from the data store. | |
| virtual int | get_table_names (StringVector *names)=0 |
| Hook to get all of the names of the tables in the store. | |
| virtual std::string | get_info () const=0 |
| |
Protected Member Functions | |
| int | check_db_dir (const char *db_dir, bool *dir_exists) |
| Check for the db directory. | |
| int | create_db_dir (const char *db_dir) |
| Create database directory. | |
| void | prune_db_dir (const char *db_dir, int tidy_wait) |
| Remove the given directory, after waiting the specified amount of time. | |
| typedef std::map<std::string, int> oasys::DurableStoreImpl::RefCountMap |
| typedef std::vector<SerializableObject*> oasys::DurableStoreImpl::PrototypeVector |
| oasys::DurableStoreImpl::DurableStoreImpl | ( | const char * | classname, | |
| const char * | logpath | |||
| ) | [inline] |
| virtual oasys::DurableStoreImpl::~DurableStoreImpl | ( | ) | [inline, virtual] |
| virtual int oasys::DurableStoreImpl::init | ( | const StorageConfig & | config | ) | [pure virtual] |
Real initialization function.
Implemented in oasys::BerkeleyDBStore, oasys::FileSystemStore, and oasys::MemoryStore.
Referenced by oasys::DurableStore::create_store().
| virtual int oasys::DurableStoreImpl::get_table | ( | DurableTableImpl ** | table, | |
| const std::string & | db_name, | |||
| int | flags, | |||
| PrototypeVector & | prototypes | |||
| ) | [pure virtual] |
Hook to get or create the implementation-specific components of a durable table.
Referenced by oasys::DurableStore::get_table().
| virtual int oasys::DurableStoreImpl::del_table | ( | const std::string & | db_name | ) | [pure virtual] |
Hook to remove a table (by name) from the data store.
Implemented in oasys::BerkeleyDBStore, oasys::FileSystemStore, and oasys::MemoryStore.
| virtual int oasys::DurableStoreImpl::get_table_names | ( | StringVector * | names | ) | [pure virtual] |
Hook to get all of the names of the tables in the store.
Implemented in oasys::BerkeleyDBStore, oasys::FileSystemStore, and oasys::MemoryStore.
Referenced by oasys::DurableStore::get_table_names().
| virtual std::string oasys::DurableStoreImpl::get_info | ( | ) | const [pure virtual] |
Implemented in oasys::BerkeleyDBStore, oasys::FileSystemStore, and oasys::MemoryStore.
Referenced by oasys::DurableStore::get_info().
| int DurableStoreImpl::check_db_dir | ( | const char * | db_dir, | |
| bool * | dir_exists | |||
| ) | [protected] |
Check for the db directory.
| db_dir | Directory to check | |
| dir_exists | To be set if directory exists. |
Definition at line 45 of file DurableStoreImpl.cc.
References oasys::DS_ERR, errno, and log_err.
Referenced by oasys::BerkeleyDBStore::init().
| int DurableStoreImpl::create_db_dir | ( | const char * | db_dir | ) | [protected] |
Create database directory.
Definition at line 72 of file DurableStoreImpl.cc.
References oasys::DS_ERR, errno, log_crit, and log_notice.
Referenced by oasys::BerkeleyDBStore::init().
| void DurableStoreImpl::prune_db_dir | ( | const char * | db_dir, | |
| int | tidy_wait | |||
| ) | [protected] |
Remove the given directory, after waiting the specified amount of time.
Definition at line 31 of file DurableStoreImpl.cc.
References log_notice, and log_warn.
Referenced by oasys::BerkeleyDBStore::init().
1.5.1