ATLAS Offline Software
Loading...
Searching...
No Matches
pool::ISession Class Referenceabstract

ISession is the interface class for user (macroscopic) sessions Every connection to a database and object reading and writing must be performed within a session. More...

#include <PoolSvc/ISession.h>

Inheritance diagram for pool::ISession:
Collaboration diagram for pool::ISession:

Public Member Functions

virtual bool disconnectAll ()=0
 Explicitly disconnects all the databases.
virtual bool start (Io::IoFlag type=Io::READ)=0
 Starts a new transaction. Returns the success of the operation.
virtual bool commit ()=0
 Commits the transaction.
virtual bool commitAndHold ()=0
 Commits the holds transaction.
virtual Io::IoFlag type () const =0
 Returns the transaction type.
virtual std::unique_ptr< IDatabase > databaseHandle (const std::string &dbName, DatabaseSpecification::NameType dbNameType)=0
 Returns a pointer to a database object. The user acquires ownership of that object.
virtual void * readObject (const Token &token, void *object=0)=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.
virtual Token * registerForWrite (const Placement &place, const void *object, const RootType &type)=0
 registerForWrite registers an object for writing to the persistent medium higher level interactions with the framework are necessary.
virtual MicroSessionManager & microSessionManager (long technology)=0
 Returns the technology given a technology type.
virtual IStorageSvc & getStorageSvc (long technology)=0
 Return StorageSvc for a given technology used in this session.
virtual ~ISession ()=default
 virtual destructor for the interface

Detailed Description

ISession is the interface class for user (macroscopic) sessions Every connection to a database and object reading and writing must be performed within a session.

It also provides access to the file catalog and to the technology specific attributes.

Definition at line 39 of file ISession.h.

Constructor & Destructor Documentation

◆ ~ISession()

virtual pool::ISession::~ISession ( )
virtualdefault

virtual destructor for the interface

Member Function Documentation

◆ commit()

virtual bool pool::ISession::commit ( )
pure virtual

Commits the transaction.

Implemented in pool::UserSession.

◆ commitAndHold()

virtual bool pool::ISession::commitAndHold ( )
pure virtual

Commits the holds transaction.

Implemented in pool::UserSession.

◆ databaseHandle()

virtual std::unique_ptr< IDatabase > pool::ISession::databaseHandle ( const std::string & dbName,
DatabaseSpecification::NameType dbNameType )
pure virtual

Returns a pointer to a database object. The user acquires ownership of that object.

Implemented in pool::UserSession.

◆ disconnectAll()

virtual bool pool::ISession::disconnectAll ( )
pure virtual

Explicitly disconnects all the databases.

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

Implemented in pool::UserSession.

◆ getStorageSvc()

virtual IStorageSvc & pool::ISession::getStorageSvc ( long technology)
pure virtual

Return StorageSvc for a given technology used in this session.

Implemented in pool::UserSession.

◆ microSessionManager()

virtual MicroSessionManager & pool::ISession::microSessionManager ( long technology)
pure virtual

Returns the technology given a technology type.

Implemented in pool::UserSession.

◆ readObject()

virtual void * pool::ISession::readObject ( const Token & token,
void * object = 0 )
pure 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.

Implemented in pool::UserSession.

◆ registerForWrite()

virtual Token * pool::ISession::registerForWrite ( const Placement & place,
const void * object,
const RootType & type )
pure 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.

Implemented in pool::UserSession.

◆ start()

virtual bool pool::ISession::start ( Io::IoFlag type = Io::READ)
pure virtual

Starts a new transaction. Returns the success of the operation.

Implemented in pool::UserSession.

◆ type()

virtual Io::IoFlag pool::ISession::type ( ) const
pure virtual

Returns the transaction type.

Implemented in pool::UserSession.


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