rippled
Loading...
Searching...
No Matches
Family.h
1#ifndef XRPL_SHAMAP_FAMILY_H_INCLUDED
2#define XRPL_SHAMAP_FAMILY_H_INCLUDED
3
4#include <xrpl/beast/utility/Journal.h>
5#include <xrpl/nodestore/Database.h>
6#include <xrpl/shamap/FullBelowCache.h>
7#include <xrpl/shamap/TreeNodeCache.h>
8
9#include <cstdint>
10
11namespace ripple {
12
13class Family
14{
15public:
16 Family(Family const&) = delete;
17 Family(Family&&) = delete;
18
19 Family&
20 operator=(Family const&) = delete;
21
22 Family&
23 operator=(Family&&) = delete;
24
25 explicit Family() = default;
26 virtual ~Family() = default;
27
28 virtual NodeStore::Database&
29 db() = 0;
30
31 virtual NodeStore::Database const&
32 db() const = 0;
33
34 virtual beast::Journal const&
35 journal() = 0;
36
40
44
45 virtual void
46 sweep() = 0;
47
53 virtual void
54 missingNodeAcquireBySeq(std::uint32_t refNum, uint256 const& nodeHash) = 0;
55
61 virtual void
62 missingNodeAcquireByHash(uint256 const& refHash, std::uint32_t refNum) = 0;
63
64 virtual void
65 reset() = 0;
66};
67
68} // namespace ripple
69
70#endif
A generic endpoint for log messages.
Definition Journal.h:41
virtual void reset()=0
virtual void sweep()=0
virtual std::shared_ptr< FullBelowCache > getFullBelowCache()=0
Return a pointer to the Family Full Below Cache.
virtual beast::Journal const & journal()=0
Family & operator=(Family &&)=delete
virtual NodeStore::Database const & db() const =0
virtual std::shared_ptr< TreeNodeCache > getTreeNodeCache()=0
Return a pointer to the Family Tree Node Cache.
virtual void missingNodeAcquireByHash(uint256 const &refHash, std::uint32_t refNum)=0
Acquire ledger that has a missing node by ledger hash.
virtual void missingNodeAcquireBySeq(std::uint32_t refNum, uint256 const &nodeHash)=0
Acquire ledger that has a missing node by ledger sequence.
virtual ~Family()=default
virtual NodeStore::Database & db()=0
Family & operator=(Family const &)=delete
Family(Family const &)=delete
Family()=default
Family(Family &&)=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