11 #include "RelationalAccess/ISessionProxy.h" 12 #include "RelationalAccess/ITransaction.h" 16 namespace persistency {
38 : coralSession(session), sessionHash(
""),
connectionString(connectionStr), principalName(principalNm) {
72 throwException(
"An update transaction is already active.",
"SessionImpl::startTransaction");
79 std::unique_lock<std::recursive_mutex>
lock;
94 std::unique_lock<std::recursive_mutex>
lock;
122 boost::posix_time::microsec_clock::universal_time(),
133 throwException(
"The transaction is not active.",
"SessionImpl::openIovDb");
144 throwException(
"IOV Database does not exist.",
"SessionImpl::openIovDb");
151 throwException(
"The transaction is not active.",
"SessionImpl::openGTDb");
162 throwException(
"GT Database does not exist.",
"SessionImpl::openGTDb");
169 throwException(
"The transaction is not active.",
"SessionImpl::openRunInfoDb");
175 throwException(
"RunInfo Database does not exist.",
"SessionImpl::openRunInfoDb");
181 throwException(
"The transaction is not active.",
"SessionImpl::openIovDb");
virtual void removeEntriesForCredential(const std::string &credential, int credentialType)=0
std::set< std::string > lockedTags
~CondDBTransaction() override
std::shared_ptr< coral::ISessionProxy > coralSession
virtual void unsetProtectionCode(const std::string &name, int code)=0
bool isTransactionActive(bool deep=true) const
void openGTDb(FailureOnOpeningPolicy policy=THROW)
CondDBTransaction(const std::shared_ptr< coral::ISessionProxy > &coralSession)
void openIovDb(FailureOnOpeningPolicy policy=THROW)
static constexpr size_t COND_SESSION_HASH_SIZE
std::unique_ptr< IIOVSchema > iovSchemaHandle
std::unique_ptr< IRunInfoSchema > runInfoSchemaHandle
virtual ITagLogTable & tagLogTable()=0
virtual void insert(const std::string &tag, const boost::posix_time::ptime &eventTime, const std::string &userName, const std::string &hostName, const std::string &command, const std::string &action, const std::string &userText)=0
std::recursive_mutex transactionMutex
std::unique_lock< std::recursive_mutex > transactionLock
std::unique_ptr< IGTSchema > gtSchemaHandle
static constexpr int COND_DBTAG_LOCK_ACCESS_CODE
virtual ITagAccessPermissionTable & tagAccessPermissionTable()=0
void startTransaction(bool readOnly=true)
std::string make(size_t keySize)
std::shared_ptr< coral::ISessionProxy > m_session
void rollbackTransaction()
IRunInfoSchema & runInfoSchema()
std::unique_ptr< ITransaction > transaction
void throwException(const std::string &message, const std::string &methodName)
virtual ITagTable & tagTable()=0
static constexpr int COND_SESSION_HASH_CODE