Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CDBBatch Class Reference

Batch of changes queued to be written to a CDBWrapper. More...

#include <dbwrapper.h>

Collaboration diagram for CDBBatch:
[legend]

Classes

struct  WriteBatchImpl
 

Public Member Functions

 CDBBatch (const CDBWrapper &_parent)
 
 ~CDBBatch ()
 
void Clear ()
 
template<typename K , typename V >
void Write (const K &key, const V &value)
 
template<typename K >
void Erase (const K &key)
 
size_t SizeEstimate () const
 

Private Member Functions

void WriteImpl (Span< const std::byte > key, DataStream &ssValue)
 
void EraseImpl (Span< const std::byte > key)
 

Private Attributes

const CDBWrapperparent
 
const std::unique_ptr< WriteBatchImplm_impl_batch
 
DataStream ssKey {}
 
DataStream ssValue {}
 
size_t size_estimate {0}
 

Friends

class CDBWrapper
 

Detailed Description

Batch of changes queued to be written to a CDBWrapper.

Definition at line 73 of file dbwrapper.h.

Constructor & Destructor Documentation

◆ CDBBatch()

CDBBatch::CDBBatch ( const CDBWrapper _parent)
explicit
Parameters
[in]_parentCDBWrapper that this batch is to be submitted to

Definition at line 159 of file dbwrapper.cpp.

◆ ~CDBBatch()

CDBBatch::~CDBBatch ( )
default

Member Function Documentation

◆ Clear()

void CDBBatch::Clear ( )

Definition at line 165 of file dbwrapper.cpp.

Here is the caller graph for this function:

◆ Erase()

template<typename K >
void CDBBatch::Erase ( const K key)
inline

Definition at line 112 of file dbwrapper.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EraseImpl()

void CDBBatch::EraseImpl ( Span< const std::byte >  key)
private

Definition at line 187 of file dbwrapper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SizeEstimate()

size_t CDBBatch::SizeEstimate ( ) const
inline

Definition at line 120 of file dbwrapper.h.

Here is the caller graph for this function:

◆ Write()

template<typename K , typename V >
void CDBBatch::Write ( const K key,
const V &  value 
)
inline

Definition at line 100 of file dbwrapper.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteImpl()

void CDBBatch::WriteImpl ( Span< const std::byte >  key,
DataStream ssValue 
)
private

Definition at line 171 of file dbwrapper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ CDBWrapper

friend class CDBWrapper
friend

Definition at line 75 of file dbwrapper.h.

Member Data Documentation

◆ m_impl_batch

const std::unique_ptr<WriteBatchImpl> CDBBatch::m_impl_batch
private

Definition at line 81 of file dbwrapper.h.

◆ parent

const CDBWrapper& CDBBatch::parent
private

Definition at line 78 of file dbwrapper.h.

◆ size_estimate

size_t CDBBatch::size_estimate {0}
private

Definition at line 86 of file dbwrapper.h.

◆ ssKey

DataStream CDBBatch::ssKey {}
private

Definition at line 83 of file dbwrapper.h.

◆ ssValue

DataStream CDBBatch::ssValue {}
private

Definition at line 84 of file dbwrapper.h.


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