ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
pool::PersistencySvc::GlobalTransaction Class Reference

#include <GlobalTransaction.h>

Inheritance diagram for pool::PersistencySvc::GlobalTransaction:
Collaboration diagram for pool::PersistencySvc::GlobalTransaction:

Public Types

enum  Type { UNDEFINED, READ, UPDATE }
 Transaction type enumeration. More...
 

Public Member Functions

 GlobalTransaction (DatabaseRegistry &registry)
 Constructor. More...
 
virtual ~GlobalTransaction ()
 Destructor. More...
 
bool start (ITransaction::Type type=READ)
 Starts a new transaction. Returns the success of the operation. More...
 
bool commit ()
 Commits the transaction. More...
 
bool commitAndHold ()
 Commits and holds the transaction. More...
 
void rollback ()
 Rolls back the transaction. More...
 
bool isActive () const
 Checks if the transaction is active. More...
 
void update ()
 Reverts to update mode. More...
 
ITransaction::Type type () const
 Returns the transaction type. More...
 

Private Attributes

ITransaction::Type m_type
 The current transaction type. More...
 
DatabaseRegistrym_databases
 The registered databases. More...
 

Detailed Description

GlobalTransaction is an implementation of the ITransaction interface.

Definition at line 20 of file GlobalTransaction.h.

Member Enumeration Documentation

◆ Type

enum pool::ITransaction::Type
inherited

Transaction type enumeration.

Enumerator
UNDEFINED 
READ 
UPDATE 

Definition at line 28 of file ITransaction.h.

28  { UNDEFINED,
29  READ,
30  UPDATE } Type;

Constructor & Destructor Documentation

◆ GlobalTransaction()

pool::PersistencySvc::GlobalTransaction::GlobalTransaction ( DatabaseRegistry registry)

Constructor.

◆ ~GlobalTransaction()

virtual pool::PersistencySvc::GlobalTransaction::~GlobalTransaction ( )
virtual

Destructor.

Member Function Documentation

◆ commit()

bool pool::PersistencySvc::GlobalTransaction::commit ( )
virtual

Commits the transaction.

Implements pool::ITransaction.

◆ commitAndHold()

bool pool::PersistencySvc::GlobalTransaction::commitAndHold ( )
virtual

Commits and holds the transaction.

Implements pool::ITransaction.

◆ isActive()

bool pool::PersistencySvc::GlobalTransaction::isActive ( ) const
virtual

Checks if the transaction is active.

Implements pool::ITransaction.

◆ rollback()

void pool::PersistencySvc::GlobalTransaction::rollback ( )
virtual

Rolls back the transaction.

Implements pool::ITransaction.

◆ start()

bool pool::PersistencySvc::GlobalTransaction::start ( ITransaction::Type  type = READ)
virtual

Starts a new transaction. Returns the success of the operation.

Implements pool::ITransaction.

◆ type()

ITransaction::Type pool::PersistencySvc::GlobalTransaction::type ( ) const
virtual

Returns the transaction type.

Implements pool::ITransaction.

◆ update()

void pool::PersistencySvc::GlobalTransaction::update ( )
virtual

Reverts to update mode.

Implements pool::ITransaction.

Member Data Documentation

◆ m_databases

DatabaseRegistry& pool::PersistencySvc::GlobalTransaction::m_databases
private

The registered databases.

Definition at line 54 of file GlobalTransaction.h.

◆ m_type

ITransaction::Type pool::PersistencySvc::GlobalTransaction::m_type
private

The current transaction type.

Definition at line 51 of file GlobalTransaction.h.


The documentation for this class was generated from the following file:
pool::ITransaction::UPDATE
@ UPDATE
Definition: ITransaction.h:30
pool::ITransaction::Type
Type
Transaction type enumeration.
Definition: ITransaction.h:28
pool::ITransaction::READ
@ READ
Definition: ITransaction.h:29
pool::ITransaction::UNDEFINED
@ UNDEFINED
Definition: ITransaction.h:28