xrpld
Loading...
Searching...
No Matches
NodeFamily.h
1#pragma once
2
3#include <xrpld/app/main/CollectorManager.h>
4
5#include <xrpl/protocol/Protocol.h>
6#include <xrpl/shamap/Family.h>
7
8namespace xrpl {
9
10class Application;
11
12class NodeFamily : public Family
13{
14public:
15 NodeFamily() = delete;
16 NodeFamily(NodeFamily const&) = delete;
18
20 operator=(NodeFamily const&) = delete;
21
23 operator=(NodeFamily&&) = delete;
24
26
28 db() override
29 {
30 return db_;
31 }
32
33 [[nodiscard]] NodeStore::Database const&
34 db() const override
35 {
36 return db_;
37 }
38
39 beast::Journal const&
40 journal() override
41 {
42 return j_;
43 }
44
47 {
48 return fbCache_;
49 }
50
53 {
54 return tnCache_;
55 }
56
57 void
58 sweep() override;
59
60 void
61 reset() override;
62
63 void
64 missingNodeAcquireBySeq(std::uint32_t seq, uint256 const& hash) override;
65
66 void
68 {
69 acquire(hash, seq);
70 }
71
72private:
76
79
80 // Missing node handler
83
84 void
85 acquire(uint256 const& hash, std::uint32_t seq);
86};
87
88} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:38
Provides the beast::insight::Collector service.
Family(Family const &)=delete
beast::Journal const & journal() override
Definition NodeFamily.h:40
std::shared_ptr< FullBelowCache > getFullBelowCache() override
Return a pointer to the Family Full Below Cache.
Definition NodeFamily.h:46
NodeFamily & operator=(NodeFamily &&)=delete
void reset() override
std::shared_ptr< TreeNodeCache > tnCache_
Definition NodeFamily.h:78
Application & app_
Definition NodeFamily.h:73
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:52
NodeStore::Database & db_
Definition NodeFamily.h:74
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:67
NodeStore::Database & db() override
Definition NodeFamily.h:28
std::mutex maxSeqMutex_
Definition NodeFamily.h:82
NodeFamily()=delete
std::shared_ptr< FullBelowCache > fbCache_
Definition NodeFamily.h:77
NodeStore::Database const & db() const override
Definition NodeFamily.h:34
beast::Journal const j_
Definition NodeFamily.h:75
LedgerIndex maxSeq_
Definition NodeFamily.h:81
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:32
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::uint32_t LedgerIndex
A ledger index.
Definition Protocol.h:259
BaseUInt< 256 > uint256
Definition base_uint.h:562