Electroneum
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cryptonote::mdb_txn_safe Struct Reference

#include <db_lmdb.h>

Collaboration diagram for cryptonote::mdb_txn_safe:
Collaboration graph
[legend]

Public Member Functions

 mdb_txn_safe (const bool check=true)
 
 ~mdb_txn_safe ()
 
void commit (std::string message="")
 
void abort ()
 
void uncheck ()
 
 operator MDB_txn * ()
 
 operator MDB_txn ** ()
 
uint64_t num_active_tx () const
 

Static Public Member Functions

static void prevent_new_txns ()
 
static void wait_no_active_txns ()
 
static void allow_new_txns ()
 

Public Attributes

mdb_threadinfom_tinfo
 
MDB_txn * m_txn
 
bool m_batch_txn = false
 
bool m_check
 

Static Public Attributes

static std::atomic< uint64_t > num_active_txns {0}
 
static std::atomic_flag creation_gate = ATOMIC_FLAG_INIT
 

Constructor & Destructor Documentation

◆ mdb_txn_safe()

cryptonote::mdb_txn_safe::mdb_txn_safe ( const bool  check = true)

◆ ~mdb_txn_safe()

cryptonote::mdb_txn_safe::~mdb_txn_safe ( )

Member Function Documentation

◆ abort()

void cryptonote::mdb_txn_safe::abort ( )

◆ allow_new_txns()

void cryptonote::mdb_txn_safe::allow_new_txns ( )
static

◆ commit()

void cryptonote::mdb_txn_safe::commit ( std::string  message = "")

◆ num_active_tx()

uint64_t cryptonote::mdb_txn_safe::num_active_tx ( ) const

◆ operator MDB_txn *()

cryptonote::mdb_txn_safe::operator MDB_txn * ( )
inline

◆ operator MDB_txn **()

cryptonote::mdb_txn_safe::operator MDB_txn ** ( )
inline

◆ prevent_new_txns()

void cryptonote::mdb_txn_safe::prevent_new_txns ( )
static

◆ uncheck()

void cryptonote::mdb_txn_safe::uncheck ( )

◆ wait_no_active_txns()

void cryptonote::mdb_txn_safe::wait_no_active_txns ( )
static

Member Data Documentation

◆ creation_gate

std::atomic_flag cryptonote::mdb_txn_safe::creation_gate = ATOMIC_FLAG_INIT
static

◆ m_batch_txn

bool cryptonote::mdb_txn_safe::m_batch_txn = false

◆ m_check

bool cryptonote::mdb_txn_safe::m_check

◆ m_tinfo

mdb_threadinfo* cryptonote::mdb_txn_safe::m_tinfo

◆ m_txn

MDB_txn* cryptonote::mdb_txn_safe::m_txn

◆ num_active_txns

std::atomic< uint64_t > cryptonote::mdb_txn_safe::num_active_txns {0}
static

The documentation for this struct was generated from the following files: