![]() |
ATLAS Offline Software
|
UserSession is an implementation of the ISession interface. More...
#include <UserSession.h>
Public Types | |
| enum | Type { INACTIVE , READ , UPDATE } |
| Transaction type enumeration. More... | |
Public Member Functions | |
| UserSession (IFileCatalog &fileCatalog) | |
| Constructor. | |
| virtual | ~UserSession () |
| Destructor. | |
| UserSession (const UserSession &)=delete | |
| UserSession & | operator= (const UserSession &)=delete |
| virtual void * | readObject (const Token &token, void *object=0) override |
| Retrieves an object from persistent store and return with type information The handle to the reflection class is necessary to later delete the object. | |
| virtual Token * | registerForWrite (const Placement &place, const void *object, const RootType &type) override |
| registerForWrite registers an object for writing to the persistent medium higher level interactions with the framework are necessary. | |
| DatabaseRegistry & | registry () |
| virtual void | setDefaultConnectionPolicy (const DatabaseConnectionPolicy &policy) override final |
| Sets the default policy when databases are opened/connected. | |
| virtual const DatabaseConnectionPolicy & | defaultConnectionPolicy () const override final |
| Retrieves the default connection policy. | |
| virtual bool | disconnectAll () override final |
| Explicitly disconnects all the databases. | |
| virtual ITransaction & | transaction () override final |
| Returns the transaction interface. | |
| virtual const ITransaction & | transaction () const override final |
| virtual bool | start (ITransaction::Type type=READ) override final |
| Starts a new transaction. Returns the success of the operation. | |
| virtual bool | commit () override final |
| Commits the transaction. | |
| virtual bool | commitAndHold () override final |
| Commits and holds the transaction. | |
| virtual bool | isActive () const override final |
| Checks if the transaction is active. | |
| virtual ITransaction::Type | type () const override final |
| Returns the transaction type. | |
| ITransaction::Type | transactionType () const |
| Returns the transaction type. | |
| virtual std::unique_ptr< IDatabase > | databaseHandle (const std::string &dbName, DatabaseSpecification::NameType dbNameType) override final |
| Creates and returns a new database handle object. | |
| virtual IFileCatalog & | fileCatalog () override final |
| Returns the file catalog in use. | |
| void | setFileCatalog (IFileCatalog &catalog) |
| Set the file catalog to be used. | |
| virtual const ITechnologySpecificAttributes & | technologySpecificAttributes (long technology) const override final |
| Returns the object holding the technology specific attributes for a given technology domain. | |
| virtual ITechnologySpecificAttributes & | technologySpecificAttributes (long technology) override final |
| MicroSessionManager & | microSessionManager (long technology) |
| Returns the technology given a technology type. | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Private Member Functions | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| DatabaseConnectionPolicy * | m_policy |
| IFileCatalog * | m_catalog |
| DatabaseRegistry * | m_registry |
| ITransaction::Type | m_transactionType |
| std::map< long, std::unique_ptr< MicroSessionManager > > | m_technologies |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) | |
UserSession is an implementation of the ISession interface.
Definition at line 30 of file UserSession.h.
|
inherited |
Transaction type enumeration.
| Enumerator | |
|---|---|
| INACTIVE | |
| READ | |
| UPDATE | |
Definition at line 22 of file ITransaction.h.
|
explicit |
Constructor.
|
virtual |
Destructor.
|
delete |
|
finaloverridevirtual |
Commits the transaction.
Implements pool::ITransaction.
|
finaloverridevirtual |
Commits and holds the transaction.
Implements pool::ITransaction.
|
finaloverridevirtual |
Creates and returns a new database handle object.
Implements pool::PersistencySvc::ISession.
|
finaloverridevirtual |
Retrieves the default connection policy.
Implements pool::PersistencySvc::ISession.
|
finaloverridevirtual |
Explicitly disconnects all the databases.
If a transaction is active, then all the changes since the last commit are aborted.
Implements pool::PersistencySvc::ISession.
|
finaloverridevirtual |
Returns the file catalog in use.
Implements pool::PersistencySvc::ISession.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlinefinaloverridevirtual |
Checks if the transaction is active.
Implements pool::ITransaction.
Definition at line 98 of file UserSession.h.
| MicroSessionManager & pool::PersistencySvc::UserSession::microSessionManager | ( | long | technology | ) |
Returns the technology given a technology type.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 167 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 182 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
delete |
|
overridevirtual |
Retrieves an object from persistent store and return with type information The handle to the reflection class is necessary to later delete the object.
The Guid of the transient class is assumed to be the classID of the token
| token | [IN] reference to the token for the object |
| object | [IN] pointer to memory for the object (created if 0) |
In case of failure zero is returned.
Implements pool::PersistencySvc::ISession.
|
overridevirtual |
registerForWrite registers an object for writing to the persistent medium higher level interactions with the framework are necessary.
| place | [IN] the placement hint |
| object | [IN] pointer to transient object which will be written |
| type | [IN] reflection class description with the layout of transient object |
Implements pool::PersistencySvc::ISession.
| DatabaseRegistry & pool::PersistencySvc::UserSession::registry | ( | ) |
|
finaloverridevirtual |
Sets the default policy when databases are opened/connected.
Implements pool::PersistencySvc::ISession.
| void pool::PersistencySvc::UserSession::setFileCatalog | ( | IFileCatalog & | catalog | ) |
Set the file catalog to be used.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
finaloverridevirtual |
Starts a new transaction. Returns the success of the operation.
Implements pool::ITransaction.
|
finaloverridevirtual |
Returns the object holding the technology specific attributes for a given technology domain.
Implements pool::PersistencySvc::ISession.
|
finaloverridevirtual |
Implements pool::PersistencySvc::ISession.
|
inlinefinaloverridevirtual |
Implements pool::PersistencySvc::ISession.
Definition at line 86 of file UserSession.h.
|
inlinefinaloverridevirtual |
Returns the transaction interface.
Implements pool::PersistencySvc::ISession.
Definition at line 85 of file UserSession.h.
|
inline |
Returns the transaction type.
Definition at line 104 of file UserSession.h.
|
inlinefinaloverridevirtual |
Returns the transaction type.
Implements pool::ITransaction.
Definition at line 101 of file UserSession.h.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 128 of file UserSession.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 127 of file UserSession.h.
|
private |
Definition at line 129 of file UserSession.h.
|
private |
Definition at line 131 of file UserSession.h.
|
private |
Definition at line 130 of file UserSession.h.