xrpld
Loading...
Searching...
No Matches
xrpl::NodeFamily Class Reference

#include <NodeFamily.h>

Inheritance diagram for xrpl::NodeFamily:
Collaboration diagram for xrpl::NodeFamily:

Public Member Functions

 NodeFamily ()=delete
 NodeFamily (NodeFamily const &)=delete
 NodeFamily (NodeFamily &&)=delete
NodeFamilyoperator= (NodeFamily const &)=delete
NodeFamilyoperator= (NodeFamily &&)=delete
 NodeFamily (Application &app, CollectorManager &cm)
node_store::Databasedb () override
node_store::Database const & db () const override
beast::Journal const & journal () override
std::shared_ptr< FullBelowCachegetFullBelowCache () override
 Return a pointer to the Family Full Below Cache.
std::shared_ptr< TreeNodeCachegetTreeNodeCache () override
 Return a pointer to the Family Tree Node Cache.
void sweep () override
void reset () override
void missingNodeAcquireBySeq (std::uint32_t seq, uint256 const &hash) override
 Acquire ledger that has a missing node by ledger sequence.
void missingNodeAcquireByHash (uint256 const &hash, std::uint32_t seq) override
 Acquire ledger that has a missing node by ledger hash.

Private Member Functions

void acquire (uint256 const &hash, std::uint32_t seq)

Private Attributes

Applicationapp_
node_store::Databasedb_
beast::Journal const j_
std::shared_ptr< FullBelowCachefbCache_
std::shared_ptr< TreeNodeCachetnCache_
LedgerIndex maxSeq_ {0}
std::mutex maxSeqMutex_

Detailed Description

Definition at line 21 of file NodeFamily.h.

Constructor & Destructor Documentation

◆ NodeFamily() [1/4]

xrpl::NodeFamily::NodeFamily ( )
delete

◆ NodeFamily() [2/4]

xrpl::NodeFamily::NodeFamily ( NodeFamily const & )
delete

◆ NodeFamily() [3/4]

xrpl::NodeFamily::NodeFamily ( NodeFamily && )
delete

◆ NodeFamily() [4/4]

xrpl::NodeFamily::NodeFamily ( Application & app,
CollectorManager & cm )

Definition at line 24 of file NodeFamily.cpp.

Member Function Documentation

◆ operator=() [1/2]

NodeFamily & xrpl::NodeFamily::operator= ( NodeFamily const & )
delete

◆ operator=() [2/2]

NodeFamily & xrpl::NodeFamily::operator= ( NodeFamily && )
delete

◆ db() [1/2]

node_store::Database & xrpl::NodeFamily::db ( )
overridevirtual

Implements xrpl::Family.

Definition at line 37 of file NodeFamily.h.

◆ db() [2/2]

node_store::Database const & xrpl::NodeFamily::db ( ) const
nodiscardoverridevirtual

Implements xrpl::Family.

Definition at line 43 of file NodeFamily.h.

◆ journal()

beast::Journal const & xrpl::NodeFamily::journal ( )
overridevirtual

Implements xrpl::Family.

Definition at line 49 of file NodeFamily.h.

◆ getFullBelowCache()

std::shared_ptr< FullBelowCache > xrpl::NodeFamily::getFullBelowCache ( )
overridevirtual

Return a pointer to the Family Full Below Cache.

Implements xrpl::Family.

Definition at line 55 of file NodeFamily.h.

◆ getTreeNodeCache()

std::shared_ptr< TreeNodeCache > xrpl::NodeFamily::getTreeNodeCache ( )
overridevirtual

Return a pointer to the Family Tree Node Cache.

Implements xrpl::Family.

Definition at line 61 of file NodeFamily.h.

◆ sweep()

void xrpl::NodeFamily::sweep ( )
overridevirtual

Implements xrpl::Family.

Definition at line 47 of file NodeFamily.cpp.

◆ reset()

void xrpl::NodeFamily::reset ( )
overridevirtual

Implements xrpl::Family.

Definition at line 54 of file NodeFamily.cpp.

◆ missingNodeAcquireBySeq()

void xrpl::NodeFamily::missingNodeAcquireBySeq ( std::uint32_t refNum,
uint256 const & nodeHash )
overridevirtual

Acquire ledger that has a missing node by ledger sequence.

Parameters
refNumSequence of ledger to acquire.
nodeHashHash of missing node to report in throw.

Implements xrpl::Family.

Definition at line 66 of file NodeFamily.cpp.

◆ missingNodeAcquireByHash()

void xrpl::NodeFamily::missingNodeAcquireByHash ( uint256 const & refHash,
std::uint32_t refNum )
overridevirtual

Acquire ledger that has a missing node by ledger hash.

Parameters
refHashHash of ledger to acquire.
refNumLedger sequence with missing node.

Implements xrpl::Family.

Definition at line 76 of file NodeFamily.h.

◆ acquire()

void xrpl::NodeFamily::acquire ( uint256 const & hash,
std::uint32_t seq )
private

Definition at line 95 of file NodeFamily.cpp.

Member Data Documentation

◆ app_

Application& xrpl::NodeFamily::app_
private

Definition at line 82 of file NodeFamily.h.

◆ db_

node_store::Database& xrpl::NodeFamily::db_
private

Definition at line 83 of file NodeFamily.h.

◆ j_

beast::Journal const xrpl::NodeFamily::j_
private

Definition at line 84 of file NodeFamily.h.

◆ fbCache_

std::shared_ptr<FullBelowCache> xrpl::NodeFamily::fbCache_
private

Definition at line 86 of file NodeFamily.h.

◆ tnCache_

std::shared_ptr<TreeNodeCache> xrpl::NodeFamily::tnCache_
private

Definition at line 87 of file NodeFamily.h.

◆ maxSeq_

LedgerIndex xrpl::NodeFamily::maxSeq_ {0}
private

Definition at line 90 of file NodeFamily.h.

◆ maxSeqMutex_

std::mutex xrpl::NodeFamily::maxSeqMutex_
private

Definition at line 91 of file NodeFamily.h.