#include <SessionImpl.h>
Public Types | |
enum | FailureOnOpeningPolicy { THROW, DO_NOT_THROW, CREATE } |
Public Member Functions | |
void | close () |
void | commitTransaction () |
IGTSchema & | gtSchema () |
IIOVSchema & | iovSchema () |
bool | isActive () const |
bool | isTransactionActive (bool deep=true) const |
void | openDb () |
void | openGTDb (FailureOnOpeningPolicy policy=THROW) |
void | openIovDb (FailureOnOpeningPolicy policy=THROW) |
void | openRunInfoDb () |
void | rollbackTransaction () |
IRunInfoSchema & | runInfoSchema () |
SessionImpl () | |
SessionImpl (std::shared_ptr< coral::ISessionProxy > &session, const std::string &connectionString) | |
void | startTransaction (bool readOnly=true) |
~SessionImpl () | |
Public Attributes | |
std::string | connectionString |
std::shared_ptr< coral::ISessionProxy > | coralSession |
std::unique_ptr< IGTSchema > | gtSchemaHandle |
std::unique_ptr< IIOVSchema > | iovSchemaHandle |
std::unique_ptr< IRunInfoSchema > | runInfoSchemaHandle |
std::unique_ptr< ITransaction > | transaction |
Private Attributes | |
std::unique_lock< std::recursive_mutex > | transactionLock |
std::recursive_mutex | transactionMutex |
Definition at line 40 of file SessionImpl.h.
cond::persistency::SessionImpl::SessionImpl | ( | ) |
Definition at line 31 of file SessionImpl.cc.
cond::persistency::SessionImpl::SessionImpl | ( | std::shared_ptr< coral::ISessionProxy > & | session, |
const std::string & | connectionString | ||
) |
Definition at line 33 of file SessionImpl.cc.
cond::persistency::SessionImpl::~SessionImpl | ( | ) |
void cond::persistency::SessionImpl::close | ( | void | ) |
Definition at line 38 of file SessionImpl.cc.
References coralSession, and transaction.
Referenced by esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), and ~SessionImpl().
void cond::persistency::SessionImpl::commitTransaction | ( | ) |
Definition at line 66 of file SessionImpl.cc.
References gtSchemaHandle, iovSchemaHandle, CommonMethods::lock(), runInfoSchemaHandle, transaction, and transactionLock.
Referenced by cond::persistency::Transaction::commit().
IGTSchema & cond::persistency::SessionImpl::gtSchema | ( | ) |
IIOVSchema & cond::persistency::SessionImpl::iovSchema | ( | ) |
bool cond::persistency::SessionImpl::isActive | ( | ) | const |
bool cond::persistency::SessionImpl::isTransactionActive | ( | bool | deep = true | ) | const |
Definition at line 93 of file SessionImpl.cc.
References transaction.
Referenced by cond::persistency::Transaction::isActive().
void cond::persistency::SessionImpl::openDb | ( | ) |
Definition at line 149 of file SessionImpl.cc.
References gtSchemaHandle, iovSchemaHandle, cond::persistency::throwException(), and transaction.
void cond::persistency::SessionImpl::openGTDb | ( | SessionImpl::FailureOnOpeningPolicy | policy = THROW | ) |
Definition at line 119 of file SessionImpl.cc.
References CREATE, gtSchemaHandle, THROW, cond::persistency::throwException(), and transaction.
void cond::persistency::SessionImpl::openIovDb | ( | SessionImpl::FailureOnOpeningPolicy | policy = THROW | ) |
Definition at line 101 of file SessionImpl.cc.
References CREATE, iovSchemaHandle, THROW, cond::persistency::throwException(), and transaction.
void cond::persistency::SessionImpl::openRunInfoDb | ( | ) |
Definition at line 137 of file SessionImpl.cc.
References runInfoSchemaHandle, cond::persistency::throwException(), and transaction.
void cond::persistency::SessionImpl::rollbackTransaction | ( | ) |
Definition at line 81 of file SessionImpl.cc.
References gtSchemaHandle, iovSchemaHandle, CommonMethods::lock(), runInfoSchemaHandle, transaction, and transactionLock.
Referenced by cond::persistency::Transaction::rollback().
IRunInfoSchema & cond::persistency::SessionImpl::runInfoSchema | ( | ) |
void cond::persistency::SessionImpl::startTransaction | ( | bool | readOnly = true | ) |
Definition at line 50 of file SessionImpl.cc.
References coralSession, gtSchemaHandle, iovSchemaHandle, CommonMethods::lock(), runInfoSchemaHandle, cond::persistency::throwException(), transaction, transactionLock, and transactionMutex.
Referenced by cond::persistency::Transaction::start().
std::string cond::persistency::SessionImpl::connectionString |
Definition at line 69 of file SessionImpl.h.
std::shared_ptr<coral::ISessionProxy> cond::persistency::SessionImpl::coralSession |
Definition at line 67 of file SessionImpl.h.
Referenced by close(), isActive(), and startTransaction().
std::unique_ptr<IGTSchema> cond::persistency::SessionImpl::gtSchemaHandle |
Definition at line 72 of file SessionImpl.h.
Referenced by commitTransaction(), gtSchema(), openDb(), openGTDb(), rollbackTransaction(), and startTransaction().
std::unique_ptr<IIOVSchema> cond::persistency::SessionImpl::iovSchemaHandle |
Definition at line 71 of file SessionImpl.h.
Referenced by commitTransaction(), iovSchema(), openDb(), openIovDb(), rollbackTransaction(), and startTransaction().
std::unique_ptr<IRunInfoSchema> cond::persistency::SessionImpl::runInfoSchemaHandle |
Definition at line 73 of file SessionImpl.h.
Referenced by commitTransaction(), openRunInfoDb(), rollbackTransaction(), runInfoSchema(), and startTransaction().
std::unique_ptr<ITransaction> cond::persistency::SessionImpl::transaction |
Definition at line 70 of file SessionImpl.h.
Referenced by close(), commitTransaction(), isTransactionActive(), openDb(), openGTDb(), openIovDb(), openRunInfoDb(), rollbackTransaction(), and startTransaction().
|
private |
Definition at line 77 of file SessionImpl.h.
Referenced by commitTransaction(), rollbackTransaction(), and startTransaction().
|
private |
Definition at line 76 of file SessionImpl.h.
Referenced by startTransaction().