ATLAS Offline Software
GlobalTransaction.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INCLUDE_PERSISTENCYSVC_GLOBALTRANSACTION_H
6 #define INCLUDE_PERSISTENCYSVC_GLOBALTRANSACTION_H
7 
9 #include "DatabaseRegistry.h"
10 #include <list>
11 
12 namespace pool {
13  namespace PersistencySvc {
14 
20  class GlobalTransaction : virtual public ITransaction {
21  public:
24 
26  virtual ~GlobalTransaction();
27 
30 
32  bool commit();
33 
35  bool commitAndHold();
36 
38  void rollback();
39 
41  bool isActive() const;
42 
44  void update();
45 
48 
49  private:
52 
55  };
56  }
57 }
58 
59 #endif
python.Dso.registry
registry
Definition: Control/AthenaServices/python/Dso.py:159
pool::PersistencySvc::GlobalTransaction::m_databases
DatabaseRegistry & m_databases
The registered databases.
Definition: GlobalTransaction.h:54
DatabaseRegistry.h
pool::PersistencySvc::GlobalTransaction
Definition: GlobalTransaction.h:20
pool
pool namespace
Definition: libname.h:15
pool::PersistencySvc::GlobalTransaction::~GlobalTransaction
virtual ~GlobalTransaction()
Destructor.
pool::PersistencySvc::GlobalTransaction::type
ITransaction::Type type() const
Returns the transaction type.
pool::PersistencySvc::GlobalTransaction::commitAndHold
bool commitAndHold()
Commits and holds the transaction.
ITransaction.h
pool::ITransaction::Type
Type
Transaction type enumeration.
Definition: ITransaction.h:28
pool::PersistencySvc::GlobalTransaction::isActive
bool isActive() const
Checks if the transaction is active.
pool::PersistencySvc::GlobalTransaction::GlobalTransaction
GlobalTransaction(DatabaseRegistry &registry)
Constructor.
pool::PersistencySvc::GlobalTransaction::rollback
void rollback()
Rolls back the transaction.
pool::ITransaction
Definition: ITransaction.h:21
pool::PersistencySvc::DatabaseRegistry
Definition: DatabaseRegistry.h:19
pool::PersistencySvc::GlobalTransaction::update
void update()
Reverts to update mode.
pool::PersistencySvc::GlobalTransaction::commit
bool commit()
Commits the transaction.
pool::PersistencySvc::GlobalTransaction::start
bool start(ITransaction::Type type=READ)
Starts a new transaction. Returns the success of the operation.
pool::PersistencySvc::GlobalTransaction::m_type
ITransaction::Type m_type
The current transaction type.
Definition: GlobalTransaction.h:51
pool::ITransaction::READ
@ READ
Definition: ITransaction.h:29