Bitcoin Core  27.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 72 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 158 of file dbwrapper.cpp.

◆ ~CDBBatch()

CDBBatch::~CDBBatch ( )
default

Member Function Documentation

◆ Clear()

void CDBBatch::Clear ( )

Definition at line 164 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 111 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 186 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 119 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 99 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 170 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 74 of file dbwrapper.h.

Member Data Documentation

◆ m_impl_batch

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

Definition at line 80 of file dbwrapper.h.

◆ parent

const CDBWrapper& CDBBatch::parent
private

Definition at line 77 of file dbwrapper.h.

◆ size_estimate

size_t CDBBatch::size_estimate {0}
private

Definition at line 85 of file dbwrapper.h.

◆ ssKey

DataStream CDBBatch::ssKey {}
private

Definition at line 82 of file dbwrapper.h.

◆ ssValue

DataStream CDBBatch::ssValue {}
private

Definition at line 83 of file dbwrapper.h.


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