ATLAS Offline Software
Loading...
Searching...
No Matches
UserSession.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INCLUDE_PERSISTENCYSVC_USERSESSION_H
6#define INCLUDE_PERSISTENCYSVC_USERSESSION_H
7
9
10namespace pool {
11
13
14 namespace PersistencySvc {
15
16 // forward declarations
17 class DatabaseRegistry;
20
26
27 class UserSession : virtual public ISession
28 {
29 public:
32
34 virtual ~UserSession();
35
36 UserSession (const UserSession&) = delete;
38
39 // Signatures needed for the PersistencySvc
42
44 virtual void setDefaultConnectionPolicy( const DatabaseConnectionPolicy& policy ) override final;
45
48
52 virtual bool disconnectAll() override final;
53
55 virtual ITransaction& transaction() override final;
56 virtual const ITransaction& transaction() const override final;
57
59 virtual std::vector< std::string > connectedDatabases() const override final;
60
62 virtual std::unique_ptr<IDatabase>
63 databaseHandle( const std::string& dbName, DatabaseSpecification::NameType dbNameType ) override final;
64
66 virtual IFileCatalog& fileCatalog() override final;
67
70
73 technologySpecificAttributes( long technology ) const override final;
74
76 technologySpecificAttributes( long technology ) override final;
77
80
81 private:
87 };
88 }
89}
90
91#endif
DatabaseConnectionPolicy is a class holding information on the policy to be followed whenever a datab...
IDatabase is the base class for database objects.
Definition IDatabase.h:25
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
Definition ISession.h:32
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...
GlobalTransaction is an implementation of the ITransaction interface.
TechnologyDispatcher is a class that delivers the appropriate MicroSessionManager given a technology.
DatabaseConnectionPolicy * m_policy
Definition UserSession.h:82
UserSession(const UserSession &)=delete
UserSession & operator=(const UserSession &)=delete
TechnologyDispatcher * m_technologyDispatcher
Definition UserSession.h:86
ITransaction & globalTransaction()
Returns the global transaction object.
virtual std::unique_ptr< IDatabase > databaseHandle(const std::string &dbName, DatabaseSpecification::NameType dbNameType) override final
Creates and returns a new database handle object.
virtual bool disconnectAll() override final
Explicitly disconnects all the databases.
DatabaseRegistry & registry()
virtual const ITechnologySpecificAttributes & technologySpecificAttributes(long technology) const override final
Returns the object holding the technology specific attributes for a given technology domain.
virtual void setDefaultConnectionPolicy(const DatabaseConnectionPolicy &policy) override final
Sets the default policy when databases are opened/connected.
virtual ~UserSession()
Destructor.
virtual const DatabaseConnectionPolicy & defaultConnectionPolicy() const override final
Retrieves the default connection policy.
virtual std::vector< std::string > connectedDatabases() const override final
Returns a vector with the file identifiers of the presently open databases.
virtual ITransaction & transaction() override final
Returns the transaction object.
virtual IFileCatalog & fileCatalog() override final
Returns the file catalog in use.
void setFileCatalog(IFileCatalog &catalog)
Set the file catalog to be used.
GlobalTransaction * m_transaction
Definition UserSession.h:85
TechnologyDispatcher & technologyDispatcher()
UserSession(IFileCatalog &fileCatalog)
Constructor.
STL class.
pool namespace
Definition libname.h:15
STL namespace.
#define private