ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
APR
PersistencySvc
src
MicroSessionManager.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef INCLUDE_PERSISTENCYSVC_MICROSESSIONMANAGER_H
6
#define INCLUDE_PERSISTENCYSVC_MICROSESSIONMANAGER_H
7
8
#include <string>
9
#include <set>
10
11
#include "
PersistencySvc/ITechnologySpecificAttributes.h
"
12
#include "
StorageSvc/pool.h
"
13
14
namespace
pool
{
15
16
// forward declarations
17
class
IStorageSvc
;
18
19
// forward declarations
20
class
DatabaseRegistry
;
21
class
DatabaseHandler
;
22
30
31
class
MicroSessionManager
:
virtual
public
ITechnologySpecificAttributes
{
32
public
:
34
MicroSessionManager
(
DatabaseRegistry
& registry,
long
technology
);
36
virtual
~MicroSessionManager
();
37
39
bool
connect
( Io::IoFlag transType,
int
ageLimit );
40
42
DatabaseHandler
*
connect
( Io::IoFlag transType,
43
const
std::string& fid,
44
const
std::string& pfn );
45
47
void
disconnect
(
DatabaseHandler
* database );
48
50
bool
disconnectAll
();
51
53
long
technology
()
const
;
54
56
std::string
fidForPfn
(
const
std::string& pfn );
57
58
protected
:
59
virtual
60
bool
attributeOfType
(
const
std::string& attributeName,
61
void
* data,
62
const
std::type_info& typeInfo,
63
const
std::string& option )
override
;
64
65
virtual
66
bool
setAttributeOfType
(
const
std::string& attributeName,
67
const
void
* data,
68
const
std::type_info& typeInfo,
69
const
std::string& option )
override
;
70
71
private
:
72
DatabaseRegistry
&
m_registry
;
73
IStorageSvc
*
m_storageSvc
;
74
bool
m_inSession
;
75
long
m_technology
;
76
std::set<DatabaseHandler*>
m_databaseHandlers
;
77
};
78
}
79
80
#endif
pool.h
ITechnologySpecificAttributes.h
pool::DatabaseHandler
DatabaseHandler is a class taking care of the micro-connections and the micro transactions for a give...
Definition
DatabaseHandler.h:30
pool::DatabaseRegistry
Definition
DatabaseRegistry.h:17
pool::IStorageSvc
The IStorageSvc interface is able to handle user request for.
Definition
IStorageSvc.h:48
pool::ITechnologySpecificAttributes
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
Definition
ITechnologySpecificAttributes.h:22
pool::MicroSessionManager::~MicroSessionManager
virtual ~MicroSessionManager()
Destructor.
pool::MicroSessionManager::connect
bool connect(Io::IoFlag transType, int ageLimit)
Connects to the storage service.
pool::MicroSessionManager::setAttributeOfType
virtual bool setAttributeOfType(const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option) override
The actual method setting the attribute data given a name.
pool::MicroSessionManager::attributeOfType
virtual bool attributeOfType(const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) override
The actual method returning the attribute data given a name.
pool::MicroSessionManager::disconnect
void disconnect(DatabaseHandler *database)
Disconnects from a database.
pool::MicroSessionManager::technology
long technology() const
Returns the technology.
pool::MicroSessionManager::fidForPfn
std::string fidForPfn(const std::string &pfn)
Fetches the FID by trying to temporatily connect to a database.
pool::MicroSessionManager::m_storageSvc
IStorageSvc * m_storageSvc
Definition
MicroSessionManager.h:73
pool::MicroSessionManager::m_registry
DatabaseRegistry & m_registry
Definition
MicroSessionManager.h:72
pool::MicroSessionManager::MicroSessionManager
MicroSessionManager(DatabaseRegistry ®istry, long technology)
Constructor.
pool::MicroSessionManager::m_inSession
bool m_inSession
Definition
MicroSessionManager.h:74
pool::MicroSessionManager::disconnectAll
bool disconnectAll()
Disconnects from all the databases.
pool::MicroSessionManager::m_technology
long m_technology
Definition
MicroSessionManager.h:75
pool::MicroSessionManager::connect
DatabaseHandler * connect(Io::IoFlag transType, const std::string &fid, const std::string &pfn)
Connects to a database.
pool::MicroSessionManager::m_databaseHandlers
std::set< DatabaseHandler * > m_databaseHandlers
Definition
MicroSessionManager.h:76
pool
Framework include files.
Definition
libname.h:15
Generated on
for ATLAS Offline Software by
1.17.0