ATLAS Offline Software
|
Db objects: DbDomainObj. More...
#include <DbDomainObj.h>
Public Types | |
typedef DbAccessObj< std::string, DbDatabaseObj > | Base |
Type definitions. More... | |
typedef std::map< std::string, DbDatabaseObj * > | Keys |
typedef Keys::iterator | iterator |
typedef Keys::const_iterator | const_iterator |
Public Member Functions | |
DbDomainObj (DbSession &session, const DbType &typ, DbAccessMode mode=pool::READ) | |
Constructor. More... | |
virtual | ~DbDomainObj () |
Standard destructor. More... | |
IDbDomain * | info () |
Access to technology dependent implementation. More... | |
const IDbDomain * | info () const |
DbSession & | session () |
Access session handle. More... | |
const DbSession & | session () const |
void | setAgeLimit (int value) |
Set the maximal allowed age limit for files in this domain. More... | |
int | ageLimit () const |
Access the maximal age limit. More... | |
bool | existsDbase (const std::string &nam) |
Check for Database existence within domain. More... | |
DbStatus | open (DbAccessMode mode) |
Open domain with possible change of access mode. More... | |
DbStatus | open () |
Open domain in default access mode. More... | |
DbStatus | close () |
Close domain. More... | |
DbStatus | ageOpenDbs () |
Increase the age of all open databases. More... | |
DbStatus | closeAgedDbs () |
Check if databases are present, which aged a lot and need to be closed. More... | |
DbStatus | setOption (const DbOption &refOpt) |
Set domain specific options. More... | |
DbStatus | getOption (DbOption &refOpt) const |
Access domain specific options. More... | |
const std::string & | name () const |
Access the instance name. More... | |
void | setName (const std::string &n) |
Access the instance name. More... | |
DbAccessMode | mode () const |
Access mode. More... | |
void | setMode (DbAccessMode m) |
Set Access mode. More... | |
const DbType & | type () const |
const IOODatabase * | db () const |
Allow access to the Database implementation. More... | |
IOODatabase * | db () |
int | refCount () const |
Access reference counter. More... | |
int | addRef () const |
Add reference count. More... | |
int | release () const |
Remove reference count. More... | |
size_t | size () const |
Object size. More... | |
DbStatus | clearEntries () |
Object cleanup: remove all entries. More... | |
const DbDatabaseObj * | find (const std::string &key) const |
Find object by key (CONST) More... | |
DbDatabaseObj * | find (const std::string &key) |
Find object by key. More... | |
DbStatus | add (const std::string &key, DbDatabaseObj *val) |
Add entry to container. More... | |
DbStatus | remove (const DbDatabaseObj *val) |
Remove entry from container. More... | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
Private Attributes | |
DbSession | m_session |
Handle to session. More... | |
int | m_maxAge |
Maximal age of files allowed. More... | |
IDbDomain * | m_info |
Technology dependent stuff. More... | |
std::atomic< int > | m_refCount |
Reference counter. More... | |
DbAccessMode | m_mode |
Access mode. More... | |
std::string | m_name |
Name of the instance. More... | |
DbType | m_type |
Database type. More... | |
Keys | m_keys |
Key entry buffer. More... | |
IOODatabase * | m_pool |
Pointer to specific pool implementation. More... | |
Db objects: DbDomainObj.
Description: Implementation independent part of a Database domain object objects.
Definition at line 39 of file DbDomainObj.h.
|
inherited |
Type definitions.
Definition at line 50 of file DbAccessObj.h.
|
inherited |
Definition at line 53 of file DbAccessObj.h.
|
inherited |
Definition at line 52 of file DbAccessObj.h.
|
inherited |
Definition at line 51 of file DbAccessObj.h.
pool::DbDomainObj::DbDomainObj | ( | DbSession & | session, |
const DbType & | typ, | ||
DbAccessMode | mode = pool::READ |
||
) |
Constructor.
|
virtual |
Standard destructor.
|
inlineinherited |
|
inlineinherited |
|
inline |
DbStatus pool::DbDomainObj::ageOpenDbs | ( | ) |
Increase the age of all open databases.
|
inlineinherited |
Definition at line 163 of file DbAccessObj.h.
|
inlineinherited |
Definition at line 164 of file DbAccessObj.h.
|
inlineinherited |
DbStatus pool::DbDomainObj::close | ( | ) |
Close domain.
DbStatus pool::DbDomainObj::closeAgedDbs | ( | ) |
Check if databases are present, which aged a lot and need to be closed.
|
inlineinherited |
Definition at line 87 of file DbAccessObj.h.
|
inlineinherited |
|
inlineinherited |
Definition at line 165 of file DbAccessObj.h.
|
inlineinherited |
Definition at line 166 of file DbAccessObj.h.
bool pool::DbDomainObj::existsDbase | ( | const std::string & | nam | ) |
Check for Database existence within domain.
|
inlineinherited |
|
inlineinherited |
Find object by key (CONST)
Definition at line 132 of file DbAccessObj.h.
Access domain specific options.
refOpt | [IN] Reference to option object |
|
inline |
Definition at line 56 of file DbDomainObj.h.
|
inlineinherited |
|
inlineinherited |
DbStatus pool::DbDomainObj::open | ( | ) |
Open domain in default access mode.
DbStatus pool::DbDomainObj::open | ( | DbAccessMode | mode | ) |
Open domain with possible change of access mode.
|
inlineinherited |
|
inlineinherited |
Remove reference count.
Definition at line 103 of file DbAccessObj.h.
|
inlineinherited |
|
inline |
Definition at line 59 of file DbDomainObj.h.
|
inline |
Set the maximal allowed age limit for files in this domain.
Definition at line 61 of file DbDomainObj.h.
|
inlineinherited |
|
inlineinherited |
Set domain specific options.
refOpt | [IN] Reference to option object |
|
inlineinherited |
|
inlineinherited |
Definition at line 84 of file DbAccessObj.h.
|
private |
Technology dependent stuff.
Definition at line 46 of file DbDomainObj.h.
|
privateinherited |
Key entry buffer.
Definition at line 64 of file DbAccessObj.h.
|
private |
Maximal age of files allowed.
Definition at line 44 of file DbDomainObj.h.
|
privateinherited |
Access mode.
Definition at line 58 of file DbAccessObj.h.
|
privateinherited |
Name of the instance.
Definition at line 60 of file DbAccessObj.h.
|
privateinherited |
Pointer to specific pool implementation.
Definition at line 66 of file DbAccessObj.h.
|
mutableprivateinherited |
Reference counter.
Definition at line 56 of file DbAccessObj.h.
|
private |
Handle to session.
Definition at line 42 of file DbDomainObj.h.
|
privateinherited |
Database type.
Definition at line 62 of file DbAccessObj.h.