![]() |
ATLAS Offline Software
|
#include <DatabaseHandler.h>
Public Member Functions | |
| DatabaseHandler (IStorageSvc &storageSvc, IStorageExplorer &storageExplorer, Session *session, long technology, const std::string &fid, const std::string &pfn, long accessmode) | |
| Constructor. Connects to the database. More... | |
| ~DatabaseHandler () | |
| Destructor. Disconnects from the database. More... | |
| bool | commitTransaction () |
| Commits the transaction. More... | |
| bool | commitAndHoldTransaction () |
| Commits and holds the transaction. More... | |
| void | rollBackTransaction () |
| Rolls back the transaction. More... | |
| bool | disconnectTransaction () |
| Disconnects the transaction. More... | |
| std::vector< std::string > | containers () |
| Gives the list of containers. More... | |
| IContainer * | container (const std::string &containerName) |
| Returns a container handle. More... | |
| const std::string & | pfn () const |
| Returns the physical file name. More... | |
| const std::string & | fid () const |
| Returns the file identifier. More... | |
| long | technology () const |
| Returns the technology identifier. More... | |
| long | accessMode () const |
| Returns the access mode. More... | |
| Token * | writeObject (const std::string &containerName, long minorTechnology, const void *object, const RootType &type) |
| Writes an object and returns a token. More... | |
| void * | readObject (const Token &token, void *object=0) |
| Reads an object given a token. More... | |
| bool | attribute (const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) |
| Returns an attribute. More... | |
| bool | setAttribute (const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option) |
| Sets an attrtibute. More... | |
Private Attributes | |
| IStorageSvc & | m_storageSvc |
| IStorageSvc reference. More... | |
| IStorageExplorer & | m_storageExplorer |
| IStorageExplorer reference. More... | |
| Session * | m_session |
| Pointer to the session for this database. More... | |
| FileDescriptor | m_fileDescriptor |
| File descriptor for this database. More... | |
| long | m_technology |
| Technology identifier. More... | |
| long | m_accessMode |
| Current access mode. More... | |
DatabaseHandler is a class taking care of the micro-connections and the micro transactions for a given database. It also gives access to the underlying containers.
Definition at line 34 of file DatabaseHandler.h.
| pool::PersistencySvc::DatabaseHandler::DatabaseHandler | ( | IStorageSvc & | storageSvc, |
| IStorageExplorer & | storageExplorer, | ||
| Session * | session, | ||
| long | technology, | ||
| const std::string & | fid, | ||
| const std::string & | pfn, | ||
| long | accessmode | ||
| ) |
Constructor. Connects to the database.
| pool::PersistencySvc::DatabaseHandler::~DatabaseHandler | ( | ) |
Destructor. Disconnects from the database.
| long pool::PersistencySvc::DatabaseHandler::accessMode | ( | ) | const |
Returns the access mode.
| bool pool::PersistencySvc::DatabaseHandler::attribute | ( | const std::string & | attributeName, |
| void * | data, | ||
| const std::type_info & | typeInfo, | ||
| const std::string & | option | ||
| ) |
Returns an attribute.
| bool pool::PersistencySvc::DatabaseHandler::commitAndHoldTransaction | ( | ) |
Commits and holds the transaction.
| bool pool::PersistencySvc::DatabaseHandler::commitTransaction | ( | ) |
Commits the transaction.
| IContainer* pool::PersistencySvc::DatabaseHandler::container | ( | const std::string & | containerName | ) |
Returns a container handle.
| std::vector< std::string > pool::PersistencySvc::DatabaseHandler::containers | ( | ) |
Gives the list of containers.
| bool pool::PersistencySvc::DatabaseHandler::disconnectTransaction | ( | ) |
Disconnects the transaction.
| const std::string& pool::PersistencySvc::DatabaseHandler::fid | ( | ) | const |
Returns the file identifier.
| const std::string& pool::PersistencySvc::DatabaseHandler::pfn | ( | ) | const |
Returns the physical file name.
Reads an object given a token.
| void pool::PersistencySvc::DatabaseHandler::rollBackTransaction | ( | ) |
Rolls back the transaction.
| bool pool::PersistencySvc::DatabaseHandler::setAttribute | ( | const std::string & | attributeName, |
| const void * | data, | ||
| const std::type_info & | typeInfo, | ||
| const std::string & | option | ||
| ) |
Sets an attrtibute.
| long pool::PersistencySvc::DatabaseHandler::technology | ( | ) | const |
Returns the technology identifier.
| Token* pool::PersistencySvc::DatabaseHandler::writeObject | ( | const std::string & | containerName, |
| long | minorTechnology, | ||
| const void * | object, | ||
| const RootType & | type | ||
| ) |
Writes an object and returns a token.
|
private |
Current access mode.
Definition at line 111 of file DatabaseHandler.h.
|
private |
File descriptor for this database.
Definition at line 107 of file DatabaseHandler.h.
|
private |
Pointer to the session for this database.
Definition at line 105 of file DatabaseHandler.h.
|
private |
IStorageExplorer reference.
Definition at line 103 of file DatabaseHandler.h.
|
private |
IStorageSvc reference.
Definition at line 101 of file DatabaseHandler.h.
|
private |
Technology identifier.
Definition at line 109 of file DatabaseHandler.h.
1.8.18