![]() |
ATLAS Offline Software
|
#include <StorageSvc/DbStorageExplorer.h>
Public Types | |
| typedef std::pair< std::string, std::string > | Parameter |
| Database parameter definition. More... | |
| typedef std::vector< Parameter > | Parameters |
| Database parameter container definition. More... | |
Public Member Functions | |
| DbStorageExplorer () | |
| Standard Constructor: Constructs an object of type DbStorageExplorer. More... | |
| DbStorageExplorer (const std::string &name, DbDomain &domH, DbStorageSvc *pOuter) | |
| Initializing Constructor: Constructs an object of type DbStorageExplorer. More... | |
| virtual | ~DbStorageExplorer () |
| Standard destructor. More... | |
| virtual DbStatus | containers (FileDescriptor &refDB, std::vector< const Token * > &conts, bool intern=false)=0 |
| Access the containers in a given database. More... | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More... | |
| MsgStream & | msg () const |
| The standard message stream. More... | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More... | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. More... | |
IStorageExplorer interface | |
| |
| virtual DbStatus | queryInterface (const Guid &riid, void **ppvUnknown) |
| IInterface implementation: Query interfaces of Interface. More... | |
| virtual unsigned int | addRef () |
| IInterface implementation: Reference Interface instance More... | |
| virtual unsigned int | release () |
| IInterface implementation: Release Interface instance More... | |
| virtual DbStatus | startSession (int mode, int tech, SessionH &session) |
| Start a new Database Session. More... | |
| virtual DbStatus | endSession (const SessionH session) |
| End the Database session. More... | |
| virtual DbStatus | connect (const SessionH sessionH, int mode, FileDescriptor &refDB) |
| Connect to a logical Database unit. More... | |
| virtual DbStatus | disconnect (FileDescriptor &refDB) |
| Disconnect from a logical Database unit. More... | |
| virtual DbStatus | containers (FileDescriptor &refDB, TokenVec &conts, bool intern) |
| Access the containers in a given database. More... | |
| virtual DbStatus | dbParam (FileDescriptor &refDB, const std::string &nam, std::string &val) |
| Retrieve existing parameter by name. More... | |
| virtual DbStatus | getDomainOption (const SessionH sessionH, DbOption &opt) |
| Access options for a given database domain. More... | |
| virtual DbStatus | setDomainOption (const SessionH sessionH, const DbOption &opt) |
| Set options for a given database domain. More... | |
| virtual DbStatus | getDatabaseOption (FileDescriptor &refDB, DbOption &opt) |
| Access options for a given database. More... | |
| virtual DbStatus | setDatabaseOption (FileDescriptor &refDB, const DbOption &opt) |
| Set options for a given database. More... | |
| virtual DbStatus | getContainerOption (FileDescriptor &refDB, const std::string &cntName, DbOption &opt) |
| Access options for a given database container. More... | |
| virtual DbStatus | setContainerOption (FileDescriptor &refDB, const std::string &cntName, const DbOption &opt) |
| Set options for a given database container. More... | |
| virtual DbStatus | select (FileDescriptor &refDB, const std::string &cntName, DbSelect &sel) |
| Initiate a selection on a given container. More... | |
| virtual DbStatus | next (DbSelect &context, Token *&refpTok) |
| Access the next token of a sequence. More... | |
Static Public Member Functions | |
| static const Guid & | interfaceID () |
| Retrieve interface ID. More... | |
Private Types | |
| typedef std::vector< const Token * > | TokenVec |
Private Member Functions | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. More... | |
Private Attributes | |
| DbStorageSvc * | m_pOuter |
| Reference to outer interface. More... | |
| DbDomain & | m_domH |
| Reference to domain handle. More... | |
| std::string | m_name |
| Explorer name. More... | |
| std::string | m_nm |
| Message source name. More... | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More... | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More... | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More... | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More... | |
The DbStorageExplorer class is able to handle user request for accessing database information such as the container information and to issue scans over database containers.
This functionality is defined in the IStorageExplorer interface and implemented in the DbStorageExplorer class. Please refer to the header file IStorageExplorer for further details.
Definition at line 35 of file DbStorageExplorer.h.
|
inherited |
Database parameter definition.
Definition at line 60 of file IStorageExplorer.h.
|
inherited |
Database parameter container definition.
Definition at line 62 of file IStorageExplorer.h.
|
private |
Definition at line 37 of file DbStorageExplorer.h.
| pool::DbStorageExplorer::DbStorageExplorer | ( | ) |
Standard Constructor: Constructs an object of type DbStorageExplorer.
| pool::DbStorageExplorer::DbStorageExplorer | ( | const std::string & | name, |
| DbDomain & | domH, | ||
| DbStorageSvc * | pOuter | ||
| ) |
Initializing Constructor: Constructs an object of type DbStorageExplorer.
Once a proper framework exists, most of these arguments will go away.
|
virtual |
Standard destructor.
|
virtual |
IInterface implementation: Reference Interface instance
Implements pool::IStorageExplorer.
|
virtual |
Connect to a logical Database unit.
A connection is equivalent to the triple (OCISession, OCIServer, OCISvcCtx) in ORACLE, a login to a datasource using ODBC, or a single federation for Objectivity. For file based technologies, such as root, MS Access, ODBC/Text etc., this is involves the opening of the requested file.
| sessionH | [IN] Session context to be used to open the Database. |
| mode | [IN] Flag to indicate the accessmode of the session. READ, NEW/CREATE/WRITE, UPDATE, RECREATE. |
| refDB | [I/O] Descriptor of the Database to be opened. On successful return the Database handle is valid. |
Implements pool::IStorageExplorer.
|
pure virtualinherited |
Access the containers in a given database.
| refDB | [IN] Reference to Database descriptor |
| conts | [OUT] Vector with tokens to used containers. |
| intern | [IN] Flag to access also internal containers |
|
virtual |
Access the containers in a given database.
| refDB | [IN] Reference to Database descriptor |
| conts | [OUT] Vector with tokens to used containers. |
| intern | [IN] Flag to access also internal containers |
|
virtual |
Retrieve existing parameter by name.
Retrieve single user specified parameter from the database.
| refDB | [IN] Reference to Database descriptor |
| nam | [IN] Name of the user parameter to be retrieved. |
| val | [OUT] Value of the user parameter to be retrieved. |
Implements pool::IStorageExplorer.
|
virtual |
Disconnect from a logical Database unit.
The request for disconnect requires, that all pending Transactions are already commited. Otherwise data are lost. On disconnection the access to the Database is finalized, closed. The token will be invalidated may not be used at any longer after disconnection.
| refDB | [IN] Descriptor of the Database access. This handle was retrieved when connecting to the logical Database. On successful return the Database handle will be invalidated. |
Implements pool::IStorageExplorer.
End the Database session.
The request to end a Database session requires, that all pending Transactions and connections are closed. Otherwise internally the close will be forced and potentially data on pending Transactions will be lost. The token will be invalidated may not be used at any longer once the session ended.
| session | [IN] Handle to the Database session. This handle was retrieved when starting the session. |
Implements pool::IStorageExplorer.
|
virtual |
Access options for a given database container.
Note: The options depend on the underlying implementation and are not normalized.
| refDB | [IN] Reference to Database descriptor |
| cntName | [IN] Name of the database container |
| opt | [IN] Reference to option object. |
Implements pool::IStorageExplorer.
|
virtual |
Access options for a given database.
Note: The options depend on the underlying implementation and are not normalized.
| refDB | [IN] Reference to Database descriptor |
| opt | [IN] Reference to option object. |
Implements pool::IStorageExplorer.
|
virtual |
Access options for a given database domain.
Domain options are global options, which refer to the database technology and not to a particular connection.
Note: The options depend on the underlying implementation and are not normalized.
| sessionH | [IN] Session context to be used to open the Database. |
| opt | [IN] Reference to option object. |
Implements pool::IStorageExplorer.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
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 164 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 179 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.
Access the next token of a sequence.
The token to the next entry in the scanned container is returned. it is up to the user to release the allocated memory used by the token.
| context | [IN] Reference to selection context. |
| refpTok | [IN/OUT] Location to store pointer to token |
Implements pool::IStorageExplorer.
|
virtual |
IInterface implementation: Query interfaces of Interface.
Implements pool::IStorageExplorer.
|
virtual |
IInterface implementation: Release Interface instance
Implements pool::IStorageExplorer.
|
virtual |
Initiate a selection on a given container.
Initiate a selection off all entries on a given container.
| refDB | [IN] Reference to Database descriptor |
| cntName | [IN] Container name to be scanned. |
| sel | [IN/OUT] Selection |
Implements pool::IStorageExplorer.
|
virtual |
Set options for a given database container.
Note: The options depend on the underlying implementation and are not normalized.
| refDB | [IN] Reference to Database descriptor |
| cntName | [IN] Name of the database container |
| opt | [IN] Reference to option object. |
Implements pool::IStorageExplorer.
|
virtual |
Set options for a given database.
Note: The options depend on the underlying implementation and are not normalized.
| refDB | [IN] Reference to Database descriptor |
| opt | [IN] Reference to option object. |
Implements pool::IStorageExplorer.
|
virtual |
Set options for a given database domain.
Domain options are global options, which refer to the database technology and not to a particular connection.
Note: The options depend on the underlying implementation and are not normalized.
| sessionH | [IN] Session context to be used to open the Database. |
| opt | [IN] Reference to option object. |
Implements pool::IStorageExplorer.
|
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.
|
virtual |
Start a new Database Session.
The Database session handles Databases of one given type. This involves specific handling of a given domain represented by a technology type. All subsequent actions involving Database actions will re-use this technology identifier. The session is a purely logical concept, which typically cannot fail unless the underlying technology requires global initialization calls.
| mode | [IN] Flag to indicate the accessmode of the session. READ, NEW/CREATE/WRITE, UPDATE, RECREATE |
| tech | [IN] Flag indicating the technology type of the Database the user wants to connect to. |
| session | [OUT] Token or handle to the Database session. This handle may later be used to open a new Database connection. |
Implements pool::IStorageExplorer.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
Reference to domain handle.
Definition at line 43 of file DbStorageExplorer.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
private |
Explorer name.
Definition at line 46 of file DbStorageExplorer.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Reference to outer interface.
Definition at line 40 of file DbStorageExplorer.h.
1.8.18