ATLAS Offline Software
Loading...
Searching...
No Matches
pool::PersistencySvc::UserSession Class Reference

UserSession is an implementation of the ISession interface. More...

#include <UserSession.h>

Inheritance diagram for pool::PersistencySvc::UserSession:
Collaboration diagram for pool::PersistencySvc::UserSession:

Public Member Functions

 UserSession (IFileCatalog &fileCatalog)
 Constructor.
virtual ~UserSession ()
 Destructor.
 UserSession (const UserSession &)=delete
UserSessionoperator= (const UserSession &)=delete
void * readObject (const Token &token, void *object=0)
 Retrieves an object from persistent store and return with type information The handle to the reflection class is necessary to later delete the object.
TokenregisterForWrite (const Placement &place, const void *object, const RootType &type)
 registerForWrite registers an object for writing to the persistent medium higher level interactions with the framework are necessary.
DatabaseRegistryregistry ()
virtual void setDefaultConnectionPolicy (const DatabaseConnectionPolicy &policy) override final
 Sets the default policy when databases are opened/connected.
virtual const DatabaseConnectionPolicydefaultConnectionPolicy () const override final
 Retrieves the default connection policy.
virtual bool disconnectAll () override final
 Explicitly disconnects all the databases.
virtual ITransactiontransaction () override final
 Returns the transaction object.
virtual const ITransactiontransaction () const override final
virtual std::unique_ptr< IDatabasedatabaseHandle (const std::string &dbName, DatabaseSpecification::NameType dbNameType) override final
 Creates and returns a new database handle object.
virtual IFileCatalogfileCatalog () override final
 Returns the file catalog in use.
void setFileCatalog (IFileCatalog &catalog)
 Set the file catalog to be used.
virtual const ITechnologySpecificAttributestechnologySpecificAttributes (long technology) const override final
 Returns the object holding the technology specific attributes for a given technology domain.
virtual ITechnologySpecificAttributestechnologySpecificAttributes (long technology) override final
ITransactionglobalTransaction ()
 Returns the global transaction object.
MicroSessionManagermicroSessionManager (long technology)
 Returns the technology given a technology type.

Static Public Member Functions

static std::unique_ptr< IPersistencySvccreate (IFileCatalog &catalog)
 Factory for PersistencySvc.

Private Attributes

DatabaseConnectionPolicym_policy
IFileCatalogm_catalog
DatabaseRegistrym_registry
GlobalTransactionm_transaction
std::map< long, std::unique_ptr< MicroSessionManager > > m_technologies

Detailed Description

UserSession is an implementation of the ISession interface.

Definition at line 29 of file UserSession.h.

Constructor & Destructor Documentation

◆ UserSession() [1/2]

pool::PersistencySvc::UserSession::UserSession ( IFileCatalog & fileCatalog)
explicit

Constructor.

◆ ~UserSession()

virtual pool::PersistencySvc::UserSession::~UserSession ( )
virtual

Destructor.

◆ UserSession() [2/2]

pool::PersistencySvc::UserSession::UserSession ( const UserSession & )
delete

Member Function Documentation

◆ create()

std::unique_ptr< IPersistencySvc > pool::IPersistencySvc::create ( IFileCatalog & catalog)
staticinherited

Factory for PersistencySvc.

◆ databaseHandle()

virtual std::unique_ptr< IDatabase > pool::PersistencySvc::UserSession::databaseHandle ( const std::string & dbName,
DatabaseSpecification::NameType dbNameType )
finaloverridevirtual

Creates and returns a new database handle object.

Implements pool::ISession.

◆ defaultConnectionPolicy()

virtual const DatabaseConnectionPolicy & pool::PersistencySvc::UserSession::defaultConnectionPolicy ( ) const
finaloverridevirtual

Retrieves the default connection policy.

Implements pool::ISession.

◆ disconnectAll()

virtual bool pool::PersistencySvc::UserSession::disconnectAll ( )
finaloverridevirtual

Explicitly disconnects all the databases.

If a transaction is active, then all the changes since the last commit are aborted.

Implements pool::ISession.

◆ fileCatalog()

virtual IFileCatalog & pool::PersistencySvc::UserSession::fileCatalog ( )
finaloverridevirtual

Returns the file catalog in use.

Implements pool::ISession.

◆ globalTransaction()

ITransaction & pool::PersistencySvc::UserSession::globalTransaction ( )

Returns the global transaction object.

◆ microSessionManager()

MicroSessionManager & pool::PersistencySvc::UserSession::microSessionManager ( long technology)

Returns the technology given a technology type.

◆ operator=()

UserSession & pool::PersistencySvc::UserSession::operator= ( const UserSession & )
delete

◆ readObject()

void * pool::PersistencySvc::UserSession::readObject ( const Token & token,
void * object = 0 )
virtual

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

Parameters
token[IN] reference to the token for the object
object[IN] pointer to memory for the object (created if 0)
Returns
void* The data.

In case of failure zero is returned.

Implements pool::IPersistencySvc.

◆ registerForWrite()

Token * pool::PersistencySvc::UserSession::registerForWrite ( const Placement & place,
const void * object,
const RootType & type )
virtual

registerForWrite registers an object for writing to the persistent medium higher level interactions with the framework are necessary.

Parameters
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
Returns
Token* the token address of the persistent object. I case of failure 0 is returned.

Implements pool::IPersistencySvc.

◆ registry()

DatabaseRegistry & pool::PersistencySvc::UserSession::registry ( )

◆ setDefaultConnectionPolicy()

virtual void pool::PersistencySvc::UserSession::setDefaultConnectionPolicy ( const DatabaseConnectionPolicy & policy)
finaloverridevirtual

Sets the default policy when databases are opened/connected.

Implements pool::ISession.

◆ setFileCatalog()

void pool::PersistencySvc::UserSession::setFileCatalog ( IFileCatalog & catalog)

Set the file catalog to be used.

◆ technologySpecificAttributes() [1/2]

virtual const ITechnologySpecificAttributes & pool::PersistencySvc::UserSession::technologySpecificAttributes ( long technology) const
finaloverridevirtual

Returns the object holding the technology specific attributes for a given technology domain.

Implements pool::ISession.

◆ technologySpecificAttributes() [2/2]

virtual ITechnologySpecificAttributes & pool::PersistencySvc::UserSession::technologySpecificAttributes ( long technology)
finaloverridevirtual

Implements pool::ISession.

◆ transaction() [1/2]

virtual const ITransaction & pool::PersistencySvc::UserSession::transaction ( ) const
finaloverridevirtual

Implements pool::ISession.

◆ transaction() [2/2]

virtual ITransaction & pool::PersistencySvc::UserSession::transaction ( )
finaloverridevirtual

Returns the transaction object.

Implements pool::ISession.

Member Data Documentation

◆ m_catalog

IFileCatalog* pool::PersistencySvc::UserSession::m_catalog
private

Definition at line 114 of file UserSession.h.

◆ m_policy

DatabaseConnectionPolicy* pool::PersistencySvc::UserSession::m_policy
private

Definition at line 113 of file UserSession.h.

◆ m_registry

DatabaseRegistry* pool::PersistencySvc::UserSession::m_registry
private

Definition at line 115 of file UserSession.h.

◆ m_technologies

std::map< long, std::unique_ptr<MicroSessionManager> > pool::PersistencySvc::UserSession::m_technologies
private

Definition at line 117 of file UserSession.h.

◆ m_transaction

GlobalTransaction* pool::PersistencySvc::UserSession::m_transaction
private

Definition at line 116 of file UserSession.h.


The documentation for this class was generated from the following file: