ATLAS Offline Software
Loading...
Searching...
No Matches
pool::Transaction Class Referenceabstract

Base class for Database Transactions. More...

#include <POOLCore/Transaction.h>

Collaboration diagram for pool::Transaction:

Public Types

enum  Type { TRANSACT_DOM = 1<<0 , TRANSACT_DB = 1<<1 , TRANSACT_CNT = 1<<2 , TRANSACT_NONE = 1<<4 }
enum  Action {
  TRANSACT_START = 1<<8 , TRANSACT_ACTIVE = 1<<9 , TRANSACT_COMMIT = 1<<10 , TRANSACT_FLUSH = 1<<11 ,
  TRANSACT_ROLLBACK = 1<<12 , TRANSACT_ENDED = 1<<13
}
enum  Mode { AUTOCOMMIT_OFF = 1<<16 , AUTOCOMMIT_ON = 1<<17 }

Public Member Functions

int technology () const
 Access to the technology type.
virtual Action state () const =0
 Access to the state of the transaction.
virtual Type type () const =0
 Access to the transaction type.

Static Public Member Functions

static const char * actionAsString (Action action)
 Translate Action to string.

Protected Member Functions

 Transaction ()
 Standard empty constructor.
virtual ~Transaction ()
 Destructor (called only by sub-classes)

Protected Attributes

int m_technology
 Technology type.

Private Member Functions

 Transaction (const Transaction &c)
 No copy constructor.
Transactionoperator= (const Transaction &c)
 No assignment.
bool operator== (const Transaction &c) const
 No equals operator.

Detailed Description

Base class for Database Transactions.

Author
M.Frank
Version
1.0

Definition at line 26 of file Transaction.h.

Member Enumeration Documentation

◆ Action

Enumerator
TRANSACT_START 
TRANSACT_ACTIVE 
TRANSACT_COMMIT 
TRANSACT_FLUSH 
TRANSACT_ROLLBACK 
TRANSACT_ENDED 

Definition at line 34 of file Transaction.h.

34 {
35 TRANSACT_START = 1<<8,
36 TRANSACT_ACTIVE = 1<<9,
37 TRANSACT_COMMIT = 1<<10,
38 TRANSACT_FLUSH = 1<<11,
39 TRANSACT_ROLLBACK = 1<<12,
40 TRANSACT_ENDED = 1<<13
41 };

◆ Mode

Enumerator
AUTOCOMMIT_OFF 
AUTOCOMMIT_ON 

Definition at line 42 of file Transaction.h.

42 {
43 AUTOCOMMIT_OFF = 1<<16,
44 AUTOCOMMIT_ON = 1<<17
45 };

◆ Type

Enumerator
TRANSACT_DOM 
TRANSACT_DB 
TRANSACT_CNT 
TRANSACT_NONE 

Definition at line 28 of file Transaction.h.

28 {
29 TRANSACT_DOM = 1<<0,
30 TRANSACT_DB = 1<<1,
31 TRANSACT_CNT = 1<<2,
32 TRANSACT_NONE = 1<<4
33 };

Constructor & Destructor Documentation

◆ Transaction() [1/2]

pool::Transaction::Transaction ( const Transaction & c)
private

No copy constructor.

◆ Transaction() [2/2]

pool::Transaction::Transaction ( )
inlineprotected

Standard empty constructor.

Definition at line 58 of file Transaction.h.

58: m_technology(0) { }
int m_technology
Technology type.
Definition Transaction.h:48

◆ ~Transaction()

virtual pool::Transaction::~Transaction ( )
inlineprotectedvirtual

Destructor (called only by sub-classes)

Definition at line 60 of file Transaction.h.

60{ }

Member Function Documentation

◆ actionAsString()

const char * pool::Transaction::actionAsString ( Action action)
static

Translate Action to string.

◆ operator=()

Transaction & pool::Transaction::operator= ( const Transaction & c)
private

No assignment.

◆ operator==()

bool pool::Transaction::operator== ( const Transaction & c) const
private

No equals operator.

◆ state()

virtual Action pool::Transaction::state ( ) const
pure virtual

Access to the state of the transaction.

◆ technology()

int pool::Transaction::technology ( ) const
inline

Access to the technology type.

Definition at line 63 of file Transaction.h.

63{ return m_technology; }

◆ type()

virtual Type pool::Transaction::type ( ) const
pure virtual

Access to the transaction type.

Member Data Documentation

◆ m_technology

int pool::Transaction::m_technology
protected

Technology type.

Definition at line 48 of file Transaction.h.


The documentation for this class was generated from the following file: