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