#include <DbTransaction.h>
Public Member Functions | |
int | commit () |
commit transaction. | |
DbTransaction (ora::Transaction &dbTrans) | |
bool | forceCommit () |
force the commit, regardless to the transaction clients | |
int | isActive () const |
current transaction is active | |
bool | isReadOnly () const |
current transaction is readonly | |
bool | rollback () |
rollback transaction | |
int | start (bool readOnly=false) |
start transaction | |
~DbTransaction () | |
Private Attributes | |
int | m_clients |
ora::Transaction & | m_dbTrans |
bool | m_readOnly |
Definition at line 18 of file DbTransaction.h.
DbTransaction::DbTransaction | ( | ora::Transaction & | dbTrans | ) |
Definition at line 8 of file DbTransaction.cc.
: m_dbTrans( dbTrans ),m_readOnly(true),m_clients(0){ }
DbTransaction::~DbTransaction | ( | ) |
Definition at line 12 of file DbTransaction.cc.
{ rollback(); }
int DbTransaction::commit | ( | ) |
commit transaction.
Definition at line 28 of file DbTransaction.cc.
Referenced by cond::CondDB::allTags(), cond::CondDB::iovToken(), cond::KeyList::load(), cond::BasePayloadProxy::make(), cond::PayLoadInspector< DataT >::PayLoadInspector(), cond::PoolTransactionSentry::Elem::~Elem(), and cond::impl::IOVImpl::~IOVImpl().
bool DbTransaction::forceCommit | ( | ) |
int DbTransaction::isActive | ( | ) | const |
current transaction is active
Definition at line 59 of file DbTransaction.cc.
Referenced by cond::impl::IOVImpl::IOVImpl().
bool DbTransaction::isReadOnly | ( | ) | const |
current transaction is readonly
Definition at line 64 of file DbTransaction.cc.
Referenced by cond::impl::IOVImpl::IOVImpl().
bool DbTransaction::rollback | ( | ) |
int DbTransaction::start | ( | bool | readOnly = false | ) |
start transaction
Definition at line 16 of file DbTransaction.cc.
Referenced by cond::CondDB::allTags(), cond::PoolTransactionSentry::Elem::Elem(), cond::AlignSplitIOV::execute(), cond::impl::IOVImpl::IOVImpl(), cond::CondDB::iovToken(), cond::KeyList::load(), cond::BasePayloadProxy::make(), cond::PayLoadInspector< DataT >::PayLoadInspector(), cond::PayLoadInspector< DataT >::plot(), cond::PayLoadInspector< DataT >::summary(), and cond::PayLoadInspector< DataT >::trend_plot().
{ if(!m_clients){ m_dbTrans.start( readOnly ); m_readOnly = readOnly; } else { if(readOnly != m_readOnly) return -1; } ++m_clients; return m_clients; }
int cond::DbTransaction::m_clients [private] |
Definition at line 39 of file DbTransaction.h.
ora::Transaction& cond::DbTransaction::m_dbTrans [private] |
Definition at line 37 of file DbTransaction.h.
bool cond::DbTransaction::m_readOnly [private] |
Definition at line 38 of file DbTransaction.h.