ATLAS Offline Software
Loading...
Searching...
No Matches
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
12#include "StorageSvc/pool.h"
13
14namespace pool {
15
16 // forward declarations
17 class IStorageSvc;
18
19 // forward declarations
20 class DatabaseRegistry;
21 class DatabaseHandler;
22
30
32 public:
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
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:
76 std::set<DatabaseHandler*> m_databaseHandlers;
77 };
78}
79
80#endif
DatabaseHandler is a class taking care of the micro-connections and the micro transactions for a give...
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:48
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
virtual ~MicroSessionManager()
Destructor.
bool connect(Io::IoFlag transType, int ageLimit)
Connects to the storage service.
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.
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.
std::string fidForPfn(const std::string &pfn)
Fetches the FID by trying to temporatily connect to a database.
MicroSessionManager(DatabaseRegistry &registry, long technology)
Constructor.
bool disconnectAll()
Disconnects from all the databases.
DatabaseHandler * connect(Io::IoFlag transType, const std::string &fid, const std::string &pfn)
Connects to a database.
std::set< DatabaseHandler * > m_databaseHandlers
Framework include files.
Definition libname.h:15