5#ifndef INCLUDE_PERSISTENCYSVC_USERSESSION_H
6#define INCLUDE_PERSISTENCYSVC_USERSESSION_H
92 virtual bool commit() override final;
107 virtual std::unique_ptr<IDatabase>
This class holds all the necessary information to guide the writing of an object in a physical place.
This class provides a token that identifies in a unique way objects on the persistent storage.
APRMessaging(const std::string &name)
DatabaseConnectionPolicy is a class holding information on the policy to be followed whenever a datab...
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...
Type
Transaction type enumeration.
virtual Type type() const =0
Returns the transaction type.
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
MicroSessionManager is a class taking care of starting sessions for a given major technology and mana...
DatabaseConnectionPolicy * m_policy
virtual bool start(ITransaction::Type type=READ) override final
Starts a new transaction. Returns the success of the operation.
UserSession(const UserSession &)=delete
UserSession & operator=(const UserSession &)=delete
virtual ITransaction::Type type() const override final
Returns the transaction type.
virtual const ITransaction & transaction() const override final
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 reflecti...
virtual bool commitAndHold() override final
Commits and holds the transaction.
std::map< long, std::unique_ptr< MicroSessionManager > > m_technologies
DatabaseRegistry * m_registry
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.
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 w...
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.
ITransaction::Type transactionType() const
Returns the transaction type.
MicroSessionManager & microSessionManager(long technology)
Returns the technology given a technology type.
virtual ITransaction & transaction() override final
Returns the transaction interface.
virtual IFileCatalog & fileCatalog() override final
Returns the file catalog in use.
void setFileCatalog(IFileCatalog &catalog)
Set the file catalog to be used.
virtual bool commit() override final
Commits the transaction.
virtual bool isActive() const override final
Checks if the transaction is active.
ITransaction::Type m_transactionType
UserSession(IFileCatalog &fileCatalog)
Constructor.
NameType
Enumeration type specifying the database name field, wherever the latter is used in methods accessing...