ATLAS Offline Software
DbDomainObj.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //====================================================================
6 // DbDomainObj object definition
7 //--------------------------------------------------------------------
8 //
9 // Package : StorageSvc (The POOL project)
10 // @author M.Frank
11 //====================================================================
12 #ifndef POOL_DBDOMAINOBJ_H
13 #define POOL_DBDOMAINOBJ_H 1
14 
15 // Framework include files
17 #include "StorageSvc/DbAccessObj.h"
18 #include "StorageSvc/DbSession.h"
19 
20 /*
21  * POOL namespace declaration
22  */
23 namespace pool {
24 
25  // Forward declarations
26  class DbDatabaseObj;
27  class DbOption;
28  class IDbDomain;
29 
39  class DbDomainObj : public DbAccessObj<std::string, DbDatabaseObj > {
40  private:
44  int m_maxAge;
47  public:
50  const DbType& typ,
53  virtual ~DbDomainObj();
55  IDbDomain* info() { return m_info; }
56  const IDbDomain* info() const { return m_info; }
58  DbSession& session() { return m_session; }
59  const DbSession& session() const { return m_session; }
61  void setAgeLimit(int value) { m_maxAge = value; }
63  int ageLimit() const { return m_maxAge; }
65  bool existsDbase(const std::string& nam);
77 
81  DbStatus setOption(const DbOption& refOpt);
83 
87  DbStatus getOption(DbOption& refOpt) const;
88  };
89 } // End namespace pool
90 #endif // POOL_DBDOMAINOBJ_H
pool::DbDomainObj::close
DbStatus close()
Close domain.
pool::DbAccessMode
int DbAccessMode
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:47
pool::DbStatus
Definition: DbStatus.h:67
pool::DbDomainObj::open
DbStatus open(DbAccessMode mode)
Open domain with possible change of access mode.
pool::DbDomainObj::open
DbStatus open()
Open domain in default access mode.
DbAccessObj.h
pool
pool namespace
Definition: libname.h:15
pool::DbSession
Db objects: class DbSession.
Definition: DbSession.h:43
pool::DbDomainObj
Db objects: DbDomainObj.
Definition: DbDomainObj.h:39
athena.value
value
Definition: athena.py:124
pool::IDbDomain
Definition: IDbDomain.h:40
DbSession.h
pool::DbDomainObj::ageOpenDbs
DbStatus ageOpenDbs()
Increase the age of all open databases.
pool::DbDomainObj::closeAgedDbs
DbStatus closeAgedDbs()
Check if databases are present, which aged a lot and need to be closed.
pool::DbDomainObj::setAgeLimit
void setAgeLimit(int value)
Set the maximal allowed age limit for files in this domain.
Definition: DbDomainObj.h:61
pool::DbDomainObj::ageLimit
int ageLimit() const
Access the maximal age limit.
Definition: DbDomainObj.h:63
pool::DbAccessObj
Definition: DbAccessObj.h:47
pool::DbDomainObj::info
IDbDomain * info()
Access to technology dependent implementation.
Definition: DbDomainObj.h:55
pool::DbType
Definition: DbType.h:31
pool::DbAccessObj< std::string, DbDatabaseObj >::mode
DbAccessMode mode() const
Access mode.
Definition: DbAccessObj.h:80
pool::DbOption
Definition: DbOption.h:36
pool::DbDomainObj::setOption
DbStatus setOption(const DbOption &refOpt)
Set domain specific options.
pool::DbDomainObj::existsDbase
bool existsDbase(const std::string &nam)
Check for Database existence within domain.
pool::READ
@ READ
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:68
pool::DbDomainObj::m_maxAge
int m_maxAge
Maximal age of files allowed.
Definition: DbDomainObj.h:44
pool::DbDomainObj::m_info
IDbDomain * m_info
Technology dependent stuff.
Definition: DbDomainObj.h:46
pool::DbDomainObj::info
const IDbDomain * info() const
Definition: DbDomainObj.h:56
pool::DbDomainObj::m_session
DbSession m_session
Handle to session.
Definition: DbDomainObj.h:42
pool::DbDomainObj::getOption
DbStatus getOption(DbOption &refOpt) const
Access domain specific options.
pool::DbDomainObj::DbDomainObj
DbDomainObj(DbSession &session, const DbType &typ, DbAccessMode mode=pool::READ)
Constructor.
pool::DbDomainObj::session
DbSession & session()
Access session handle.
Definition: DbDomainObj.h:58
Token.h
This file contains the class definition for the Token class (migrated from POOL).
pool::DbDomainObj::~DbDomainObj
virtual ~DbDomainObj()
Standard destructor.
pool::DbDomainObj::session
const DbSession & session() const
Definition: DbDomainObj.h:59