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

Public Member Functions

 TestNodeFamily (beast::Journal j)
 
NodeStore::Databasedb () override
 
NodeStore::Database const & db () const override
 
beast::Journal const & journal () 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
 
bool isShardBacked () const override
 
void missingNodeAcquireBySeq (std::uint32_t refNum, uint256 const &nodeHash) override
 Acquire ledger that has a missing node by ledger sequence. More...
 
void missingNodeAcquireByHash (uint256 const &refHash, std::uint32_t refNum) override
 Acquire ledger that has a missing node by ledger hash. More...
 
void reset () override
 
beast::manual_clock< std::chrono::steady_clockclock ()
 

Private Attributes

std::unique_ptr< NodeStore::Databasedb_
 
std::shared_ptr< FullBelowCachefbCache_
 
std::shared_ptr< TreeNodeCachetnCache_
 
TestStopwatch clock_
 
NodeStore::DummyScheduler scheduler_
 
const beast::Journal j_
 

Detailed Description

Definition at line 32 of file common.h.

Constructor & Destructor Documentation

◆ TestNodeFamily()

ripple::tests::TestNodeFamily::TestNodeFamily ( beast::Journal  j)

Definition at line 46 of file common.h.

Member Function Documentation

◆ db() [1/2]

NodeStore::Database& ripple::tests::TestNodeFamily::db ( )
overridevirtual

Implements ripple::Family.

Definition at line 67 of file common.h.

◆ db() [2/2]

NodeStore::Database const& ripple::tests::TestNodeFamily::db ( ) const
overridevirtual

Implements ripple::Family.

Definition at line 73 of file common.h.

◆ journal()

beast::Journal const& ripple::tests::TestNodeFamily::journal ( )
overridevirtual

Implements ripple::Family.

Definition at line 79 of file common.h.

◆ getFullBelowCache()

std::shared_ptr<FullBelowCache> ripple::tests::TestNodeFamily::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 84 of file common.h.

◆ getTreeNodeCache()

std::shared_ptr<TreeNodeCache> ripple::tests::TestNodeFamily::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 89 of file common.h.

◆ sweep()

void ripple::tests::TestNodeFamily::sweep ( )
overridevirtual

Implements ripple::Family.

Definition at line 95 of file common.h.

◆ isShardBacked()

bool ripple::tests::TestNodeFamily::isShardBacked ( ) const
overridevirtual

Implements ripple::Family.

Definition at line 102 of file common.h.

◆ missingNodeAcquireBySeq()

void ripple::tests::TestNodeFamily::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 108 of file common.h.

◆ missingNodeAcquireByHash()

void ripple::tests::TestNodeFamily::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 115 of file common.h.

◆ reset()

void ripple::tests::TestNodeFamily::reset ( )
overridevirtual

Implements ripple::Family.

Definition at line 122 of file common.h.

◆ clock()

beast::manual_clock<std::chrono::steady_clock> ripple::tests::TestNodeFamily::clock ( )

Definition at line 129 of file common.h.

Member Data Documentation

◆ db_

std::unique_ptr<NodeStore::Database> ripple::tests::TestNodeFamily::db_
private

Definition at line 35 of file common.h.

◆ fbCache_

std::shared_ptr<FullBelowCache> ripple::tests::TestNodeFamily::fbCache_
private

Definition at line 37 of file common.h.

◆ tnCache_

std::shared_ptr<TreeNodeCache> ripple::tests::TestNodeFamily::tnCache_
private

Definition at line 38 of file common.h.

◆ clock_

TestStopwatch ripple::tests::TestNodeFamily::clock_
private

Definition at line 40 of file common.h.

◆ scheduler_

NodeStore::DummyScheduler ripple::tests::TestNodeFamily::scheduler_
private

Definition at line 41 of file common.h.

◆ j_

const beast::Journal ripple::tests::TestNodeFamily::j_
private

Definition at line 43 of file common.h.