ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalTransaction.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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 "POOLCore/DbPrint.h"
11
12#include <list>
13
14namespace pool {
15 namespace PersistencySvc {
16
22 class GlobalTransaction : virtual public ITransaction, public APRMessaging {
23 public:
25 explicit GlobalTransaction( DatabaseRegistry& registry );
26
29
32
34 bool commit();
35
38
40 void rollback();
41
43 bool isActive() const;
44
46 void update();
47
50
51 private:
54
57 };
58 }
59}
60
61#endif
APRMessaging(const std::string &name)
ITransaction is the interface class for user (macroscopic transactions) Every operation with the pool...
Type
Transaction type enumeration.
bool isActive() const
Checks if the transaction is active.
void rollback()
Rolls back the transaction.
DatabaseRegistry & m_databases
The registered databases.
bool commit()
Commits the transaction.
void update()
Reverts to update mode.
bool start(ITransaction::Type type=READ)
Starts a new transaction. Returns the success of the operation.
bool commitAndHold()
Commits and holds the transaction.
ITransaction::Type type() const
Returns the transaction type.
ITransaction::Type m_type
The current transaction type.
GlobalTransaction(DatabaseRegistry &registry)
Constructor.
pool namespace
Definition libname.h:15