rippled
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ripple::NodeFamily Class Reference
Inheritance diagram for ripple::NodeFamily:
Inheritance graph
[legend]
Collaboration diagram for ripple::NodeFamily:
Collaboration graph
[legend]

Public Member Functions

 NodeFamily ()=delete
 
 NodeFamily (NodeFamily const &)=delete
 
 NodeFamily (NodeFamily &&)=delete
 
NodeFamilyoperator= (NodeFamily const &)=delete
 
NodeFamilyoperator= (NodeFamily &&)=delete
 
 NodeFamily (Application &app, CollectorManager &cm)
 
NodeStore::Databasedb () override
 
NodeStore::Database const & db () const override
 
beast::Journal const & journal () override
 
bool isShardBacked () const override
 
std::shared_ptr< FullBelowCachegetFullBelowCache (std::uint32_t) override
 Return a pointer to the Family Full Below Cache. More...
 
std::shared_ptr< TreeNodeCachegetTreeNodeCache (std::uint32_t) override
 Return a pointer to the Family Tree Node Cache. More...
 
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. More...
 
void missingNodeAcquireByHash (uint256 const &hash, std::uint32_t seq) override
 Acquire ledger that has a missing node by ledger hash. More...
 

Private Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 30 of file NodeFamily.h.

Constructor & Destructor Documentation

◆ NodeFamily() [1/4]

ripple::NodeFamily::NodeFamily ( )
delete

◆ NodeFamily() [2/4]

ripple::NodeFamily::NodeFamily ( NodeFamily const &  )
delete

◆ NodeFamily() [3/4]

ripple::NodeFamily::NodeFamily ( NodeFamily &&  )
delete

◆ NodeFamily() [4/4]

ripple::NodeFamily::NodeFamily ( Application app,
CollectorManager cm 
)

Definition at line 28 of file NodeFamily.cpp.

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ db() [1/2]

NodeStore::Database& ripple::NodeFamily::db ( )
overridevirtual

Implements ripple::Family.

Definition at line 46 of file NodeFamily.h.

◆ db() [2/2]

NodeStore::Database const& ripple::NodeFamily::db ( ) const
overridevirtual

Implements ripple::Family.

Definition at line 52 of file NodeFamily.h.

◆ journal()

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

Implements ripple::Family.

Definition at line 58 of file NodeFamily.h.

◆ isShardBacked()

bool ripple::NodeFamily::isShardBacked ( ) const
overridevirtual

Implements ripple::Family.

Definition at line 64 of file NodeFamily.h.

◆ getFullBelowCache()

std::shared_ptr<FullBelowCache> ripple::NodeFamily::getFullBelowCache ( std::uint32_t  ledgerSeq)
overridevirtual

Return a pointer to the Family Full Below Cache.

Parameters
ledgerSeqledger sequence determines a corresponding shard cache
Note
ledgerSeq is used by ShardFamily and ignored by NodeFamily

Implements ripple::Family.

Definition at line 69 of file NodeFamily.h.

◆ getTreeNodeCache()

std::shared_ptr<TreeNodeCache> ripple::NodeFamily::getTreeNodeCache ( std::uint32_t  ledgerSeq)
overridevirtual

Return a pointer to the Family Tree Node Cache.

Parameters
ledgerSeqledger sequence determines a corresponding shard cache
Note
ledgerSeq is used by ShardFamily and ignored by NodeFamily

Implements ripple::Family.

Definition at line 74 of file NodeFamily.h.

◆ sweep()

void ripple::NodeFamily::sweep ( )
overridevirtual

Implements ripple::Family.

Definition at line 50 of file NodeFamily.cpp.

◆ reset()

void ripple::NodeFamily::reset ( )
overridevirtual

Implements ripple::Family.

Definition at line 57 of file NodeFamily.cpp.

◆ missingNodeAcquireBySeq()

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

Acquire ledger that has a missing node by ledger sequence.

Throw if in reporting mode.

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

Implements ripple::Family.

Definition at line 69 of file NodeFamily.cpp.

◆ missingNodeAcquireByHash()

void ripple::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 ripple::Family.

Definition at line 89 of file NodeFamily.h.

◆ acquire()

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

Definition at line 106 of file NodeFamily.cpp.

Member Data Documentation

◆ app_

Application& ripple::NodeFamily::app_
private

Definition at line 95 of file NodeFamily.h.

◆ db_

NodeStore::Database& ripple::NodeFamily::db_
private

Definition at line 96 of file NodeFamily.h.

◆ j_

const beast::Journal ripple::NodeFamily::j_
private

Definition at line 97 of file NodeFamily.h.

◆ fbCache_

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

Definition at line 99 of file NodeFamily.h.

◆ tnCache_

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

Definition at line 100 of file NodeFamily.h.

◆ maxSeq_

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

Definition at line 103 of file NodeFamily.h.

◆ maxSeqMutex_

std::mutex ripple::NodeFamily::maxSeqMutex_
private

Definition at line 104 of file NodeFamily.h.