CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cond::persistency::TransactionScope Class Reference

#include <Session.h>

Public Member Functions

void close ()
 
void commit ()
 
void start (bool readOnly=true)
 
 TransactionScope (Transaction &transaction)
 
 ~TransactionScope ()
 

Private Attributes

bool m_status
 
Transactionm_transaction
 

Detailed Description

Definition at line 231 of file Session.h.

Constructor & Destructor Documentation

◆ TransactionScope()

cond::persistency::TransactionScope::TransactionScope ( Transaction transaction)
explicit

Definition at line 226 of file Session.cc.

226  : m_transaction(transaction), m_status(true) {
228  }

References cond::persistency::Transaction::isActive(), m_status, and m_transaction.

◆ ~TransactionScope()

cond::persistency::TransactionScope::~TransactionScope ( )

Member Function Documentation

◆ close()

void cond::persistency::TransactionScope::close ( void  )

Definition at line 246 of file Session.cc.

246 { m_status = true; }

References m_status.

Referenced by esMonitoring.AsyncLineReaderMixin::handle_close(), and esMonitoring.FDJsonServer::handle_close().

◆ commit()

void cond::persistency::TransactionScope::commit ( )

Definition at line 241 of file Session.cc.

241  {
243  m_status = true;
244  }

References cond::persistency::Transaction::commit(), m_status, and m_transaction.

Referenced by querying.connection::write_and_commit().

◆ start()

void cond::persistency::TransactionScope::start ( bool  readOnly = true)

Member Data Documentation

◆ m_status

bool cond::persistency::TransactionScope::m_status
private

Definition at line 245 of file Session.h.

Referenced by close(), commit(), start(), TransactionScope(), and ~TransactionScope().

◆ m_transaction

Transaction& cond::persistency::TransactionScope::m_transaction
private

Definition at line 244 of file Session.h.

Referenced by commit(), start(), TransactionScope(), and ~TransactionScope().

cond::persistency::TransactionScope::m_status
bool m_status
Definition: Session.h:245
cond::persistency::TransactionScope::m_transaction
Transaction & m_transaction
Definition: Session.h:244
cond::persistency::Transaction::commit
void commit()
Definition: Session.cc:23
cond::persistency::Transaction::isActive
bool isActive()
Definition: Session.cc:33
cond::persistency::Transaction::start
void start(bool readOnly=true)
Definition: Session.cc:18
cond::persistency::Transaction::rollback
void rollback()
Definition: Session.cc:28