LMDBAL 0.6.0
LMDB (Lightning Memory-Mapped Database Manager) Abstraction Layer
|
Public read only transaction. More...
Public Member Functions | |
Transaction () | |
Constructs inactive transaction. | |
Transaction (Transaction &&other) | |
Moves transaction to a new object. | |
Transaction (const Transaction &other)=delete | |
Transaction & | operator= (const Transaction &other)=delete |
Transaction & | operator= (Transaction &&other) |
Move-assigns transaction to the new object. | |
virtual | ~Transaction () |
Destroys transaction. | |
void | terminate () |
Terminates transaction if it was active. | |
bool | isActive () const |
Returns transaction states. | |
Protected Member Functions | |
Transaction (TransactionID txn, const Base *parent) | |
Constructs an active transaction. | |
void | reset () |
Resets inner transaction properties to inactive state. | |
Protected Attributes | |
TransactionID | txn |
Transaction inner handler. | |
bool | active |
Transaction state. | |
const Base * | parent |
Pointer to the database this transaction belongs to. | |
Friends | |
class | Base |
class | iStorage |
Public read only transaction.
This class provides read only transactions you can use to speed to your queries keeping them thread safe. LMDBAL::Transaction is NOT COPYABLE but MOVABLE. Transaction can be in one of two states: active or terminated. The way to receive an active LMDBAL::Transaction is to call LMDBAL::Base::beginReadOnlyTransaction.
Active transactions become terminated upon the call of LMDBAL::Transaction::terminate. Active transactions automaticaly terminate themselves upon destruction.
You CAN NOT use inactive transactions for any query.
bool LMDBAL::Transaction::isActive | ( | ) | const |
Returns transaction states.
void LMDBAL::Transaction::terminate | ( | ) |
Terminates transaction if it was active.
Transaction becomes terminated after calling this method