rippled
Loading...
Searching...
No Matches
NodeFamily.h
1#pragma once
2
3#include <xrpl/shamap/Family.h>
4
5namespace xrpl {
6
7class Application;
8
9class NodeFamily : public Family
10{
11public:
12 NodeFamily() = delete;
13 NodeFamily(NodeFamily const&) = delete;
15
17 operator=(NodeFamily const&) = delete;
18
20 operator=(NodeFamily&&) = delete;
21
23
25 db() override
26 {
27 return db_;
28 }
29
31 db() const override
32 {
33 return db_;
34 }
35
36 beast::Journal const&
37 journal() override
38 {
39 return j_;
40 }
41
44 {
45 return fbCache_;
46 }
47
50 {
51 return tnCache_;
52 }
53
54 void
55 sweep() override;
56
57 void
58 reset() override;
59
60 void
61 missingNodeAcquireBySeq(std::uint32_t seq, uint256 const& hash) override;
62
63 void
65 {
66 acquire(hash, seq);
67 }
68
69private:
73
76
77 // Missing node handler
80
81 void
82 acquire(uint256 const& hash, std::uint32_t seq);
83};
84
85} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
Provides the beast::insight::Collector service.
beast::Journal const & journal() override
Definition NodeFamily.h:37
std::shared_ptr< FullBelowCache > getFullBelowCache() override
Return a pointer to the Family Full Below Cache.
Definition NodeFamily.h:43
NodeFamily & operator=(NodeFamily &&)=delete
void reset() override
std::shared_ptr< TreeNodeCache > tnCache_
Definition NodeFamily.h:75
Application & app_
Definition NodeFamily.h:70
NodeFamily(NodeFamily const &)=delete
NodeFamily(NodeFamily &&)=delete
std::shared_ptr< TreeNodeCache > getTreeNodeCache() override
Return a pointer to the Family Tree Node Cache.
Definition NodeFamily.h:49
NodeStore::Database & db_
Definition NodeFamily.h:71
void acquire(uint256 const &hash, std::uint32_t seq)
NodeFamily & operator=(NodeFamily const &)=delete
void sweep() override
void missingNodeAcquireByHash(uint256 const &hash, std::uint32_t seq) override
Acquire ledger that has a missing node by ledger hash.
Definition NodeFamily.h:64
NodeStore::Database & db() override
Definition NodeFamily.h:25
std::mutex maxSeqMutex_
Definition NodeFamily.h:79
NodeFamily()=delete
std::shared_ptr< FullBelowCache > fbCache_
Definition NodeFamily.h:74
NodeStore::Database const & db() const override
Definition NodeFamily.h:31
beast::Journal const j_
Definition NodeFamily.h:72
LedgerIndex maxSeq_
Definition NodeFamily.h:78
void missingNodeAcquireBySeq(std::uint32_t seq, uint256 const &hash) override
Acquire ledger that has a missing node by ledger sequence.
Persistency layer for NodeObject.
Definition Database.h:31
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5