ATLAS Offline Software
Loading...
Searching...
No Matches
MicroSessionManager.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#ifndef INCLUDE_PERSISTENCYSVC_MICROSESSIONMANAGER_H
6#define INCLUDE_PERSISTENCYSVC_MICROSESSIONMANAGER_H
7
8#include <string>
9#include <set>
10
12
13namespace pool {
14
15 // forward declarations
16 class IStorageSvc;
17 class Session;
18 class ITransaction;
19
20 namespace PersistencySvc {
21
22 // forward declarations
23 class DatabaseRegistry;
24 class DatabaseHandler;
25
33
35 public:
38 ITransaction& transaction,
39 long technology );
42
44 DatabaseHandler* connect( const std::string& fid,
45 const std::string& pfn,
46 long accessMode );
47
49 void disconnect( DatabaseHandler* database );
50
53
55 long technology() const;
56
58 std::string fidForPfn( const std::string& pfn );
59
60 protected:
61 virtual
62 bool attributeOfType( const std::string& attributeName,
63 void* data,
64 const std::type_info& typeInfo,
65 const std::string& option ) override;
66
67 virtual
68 bool setAttributeOfType( const std::string& attributeName,
69 const void* data,
70 const std::type_info& typeInfo,
71 const std::string& option ) override;
72
73 private:
77 Session* m_session;
79 std::set<DatabaseHandler*> m_databaseHandlers;
80 };
81 }
82}
83
84#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:58
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
ITransaction is the interface class for user (macroscopic transactions) Every operation with the pool...
DatabaseHandler is a class taking care of the micro-connections and the micro transactions for a give...
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.
MicroSessionManager(DatabaseRegistry &registry, ITransaction &transaction, long technology)
Constructor.
std::string fidForPfn(const std::string &pfn)
Fetches the FID by trying to temporatily connect to a database.
bool disconnectAll()
Disconnects from all the databases.
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.
void disconnect(DatabaseHandler *database)
Disconnects from a database.
long technology() const
Returns the technology.
DatabaseHandler * connect(const std::string &fid, const std::string &pfn, long accessMode)
Connects to a database.
std::set< DatabaseHandler * > m_databaseHandlers
pool namespace
Definition libname.h:15
const char * accessMode(pool::DbAccessMode access_mode)
Translate access mode to string.