CMS 3D CMS Logo

cond::ITransaction Class Reference

#include <CondCore/DBCommon/interface/ITransaction.h>

Inheritance diagram for cond::ITransaction:

cond::CoralTransaction cond::PoolTransaction

List of all members.

Public Member Functions

virtual void commit ()=0
 commit transaction. Will disconnect from database if connection timeout==0 or connectted time close to the threshold
virtual bool isReadOnly () const =0
 ITransaction ()
virtual IConnectionProxyparentConnection ()=0
virtual void rollback ()=0
 rollback transaction
virtual void start (bool isReadOnly=true)=0
 start transaction
virtual ~ITransaction ()

Protected Member Functions

void attach (ITransactionObserver *)
void NotifyEndOfTransaction ()
void NotifyStartOfTransaction ()

Private Attributes

std::vector
< cond::ITransactionObserver * > 
m_observers


Detailed Description

Definition at line 17 of file ITransaction.h.


Constructor & Destructor Documentation

cond::ITransaction::ITransaction (  )  [inline]

Definition at line 19 of file ITransaction.h.

References m_observers.

00019                   {
00020       m_observers.reserve(10);
00021     }

virtual cond::ITransaction::~ITransaction (  )  [inline, virtual]

Definition at line 22 of file ITransaction.h.

00022 {}


Member Function Documentation

void ITransaction::attach ( cond::ITransactionObserver observer  )  [protected]

Definition at line 5 of file ITransaction.cc.

References m_observers.

Referenced by cond::CoralTransaction::CoralTransaction(), and cond::PoolTransaction::PoolTransaction().

00005                                                             {
00006   m_observers.push_back( observer );
00007 }

virtual void cond::ITransaction::commit (  )  [pure virtual]

commit transaction. Will disconnect from database if connection timeout==0 or connectted time close to the threshold

Implemented in cond::CoralTransaction, and cond::PoolTransaction.

virtual bool cond::ITransaction::isReadOnly (  )  const [pure virtual]

Implemented in cond::CoralTransaction, and cond::PoolTransaction.

Referenced by cond::CoralConnectionProxy::reactOnStartOfTransaction().

void ITransaction::NotifyEndOfTransaction (  )  [protected]

Definition at line 18 of file ITransaction.cc.

References it, and m_observers.

Referenced by cond::CoralTransaction::commit(), cond::PoolTransaction::forceCommit(), cond::CoralTransaction::rollback(), and cond::PoolTransaction::rollback().

00018                                         {
00019   std::vector< cond::ITransactionObserver* >::iterator it;
00020   std::vector< cond::ITransactionObserver* >::iterator itBeg=m_observers.begin();
00021   std::vector< cond::ITransactionObserver* >::iterator itEnd=m_observers.end();
00022   for (it=itBeg; it!=itEnd; ++it){
00023     (*it)->reactOnEndOfTransaction(this);
00024   } 
00025 }

void ITransaction::NotifyStartOfTransaction (  )  [protected]

Definition at line 9 of file ITransaction.cc.

References it, and m_observers.

Referenced by cond::CoralTransaction::start(), cond::PoolTransaction::start(), and cond::PoolTransaction::upgrade().

00009                                           {
00010   std::vector< cond::ITransactionObserver* >::iterator it;
00011   std::vector< cond::ITransactionObserver* >::iterator itBeg=m_observers.begin();
00012   std::vector< cond::ITransactionObserver* >::iterator itEnd=m_observers.end();
00013   for (it=itBeg; it!=itEnd; ++it){
00014     (*it)->reactOnStartOfTransaction(this);
00015   } 
00016 }

virtual IConnectionProxy& cond::ITransaction::parentConnection (  )  [pure virtual]

Implemented in cond::CoralTransaction, and cond::PoolTransaction.

virtual void cond::ITransaction::rollback (  )  [pure virtual]

rollback transaction

Implemented in cond::CoralTransaction, and cond::PoolTransaction.

virtual void cond::ITransaction::start ( bool  isReadOnly = true  )  [pure virtual]

start transaction

Implemented in cond::CoralTransaction, and cond::PoolTransaction.


Member Data Documentation

std::vector< cond::ITransactionObserver* > cond::ITransaction::m_observers [private]

Definition at line 40 of file ITransaction.h.

Referenced by attach(), ITransaction(), NotifyEndOfTransaction(), and NotifyStartOfTransaction().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:36:46 2009 for CMSSW by  doxygen 1.5.4