ATLAS Offline Software
Loading...
Searching...
No Matches
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
19#include "POOLCore/DbPrint.h"
20
21/*
22 * POOL namespace declaration
23 */
24namespace pool {
25
26 // Forward declarations
27 class DbDatabaseObj;
28 class DbOption;
29 class IDbDomain;
30
40 class DbDomainObj : public DbAccessObj<std::string, DbDatabaseObj >, public APRMessaging {
41 private:
48 public:
51 const DbType& typ,
54 virtual ~DbDomainObj();
56 IDbDomain* info() { return m_info; }
57 const IDbDomain* info() const { return m_info; }
60 const DbSession& session() const { return m_session; }
62 void setAgeLimit(int value) { m_maxAge = value; }
64 int ageLimit() const { return m_maxAge; }
66 bool existsDbase(const std::string& nam);
78
82 DbStatus setOption(const DbOption& refOpt);
84
88 DbStatus getOption(DbOption& refOpt) const;
89 };
90} // End namespace pool
91#endif // POOL_DBDOMAINOBJ_H
This file contains the class definition for the Token class (migrated from POOL).
APRMessaging(const std::string &name)
DbAccessObj(const std::string &n, DbAccessMode m, const DbType &t, IOODatabase *s=0)
Definition DbAccessObj.h:70
DbStatus setOption(const DbOption &refOpt)
Set domain specific options.
const DbSession & session() const
Definition DbDomainObj.h:60
DbSession m_session
Handle to session.
Definition DbDomainObj.h:43
bool existsDbase(const std::string &nam)
Check for Database existence within domain.
DbStatus getOption(DbOption &refOpt) const
Access domain specific options.
IDbDomain * info()
Access to technology dependent implementation.
Definition DbDomainObj.h:56
DbStatus close()
Close domain.
DbSession & session()
Access session handle.
Definition DbDomainObj.h:59
IDbDomain * m_info
Technology dependent stuff.
Definition DbDomainObj.h:47
DbStatus ageOpenDbs()
Increase the age of all open databases.
DbDomainObj(DbSession &session, const DbType &typ, DbAccessMode mode=pool::READ)
Constructor.
virtual ~DbDomainObj()
Standard destructor.
int ageLimit() const
Access the maximal age limit.
Definition DbDomainObj.h:64
void setAgeLimit(int value)
Set the maximal allowed age limit for files in this domain.
Definition DbDomainObj.h:62
DbStatus closeAgedDbs()
Check if databases are present, which aged a lot and need to be closed.
int m_maxAge
Maximal age of files allowed.
Definition DbDomainObj.h:45
DbStatus open(DbAccessMode mode)
Open domain with possible change of access mode.
DbStatus open()
Open domain in default access mode.
const IDbDomain * info() const
Definition DbDomainObj.h:57
Description: Definition an option to be supplied to database objects.
Definition DbOption.h:36
Db objects: class DbSession.
Definition DbSession.h:43
This class is highly inspired by the error code distribution system as it is used in DEC/VMS or MS/WN...
Definition DbStatus.h:64
IDbDomain interface.
Definition IDbDomain.h:40
pool namespace
Definition libname.h:15