rippled
Loading...
Searching...
No Matches
SHAMapStore.h
1#pragma once
2
3#include <xrpl/ledger/Ledger.h>
4#include <xrpl/nodestore/Manager.h>
5
6#include <optional>
7
8namespace xrpl {
9
10class TransactionMaster;
11
17{
18public:
19 virtual ~SHAMapStore() = default;
20
22 virtual void
24
25 virtual void
26 start() = 0;
27
28 virtual void
29 rendezvous() const = 0;
30
31 virtual void
32 stop() = 0;
33
34 virtual std::uint32_t
35 clampFetchDepth(std::uint32_t fetch_depth) const = 0;
36
38 makeNodeStore(int readThreads) = 0;
39
41 virtual LedgerIndex
42 setCanDelete(LedgerIndex canDelete) = 0;
43
45 virtual bool
46 advisoryDelete() const = 0;
47
51 virtual LedgerIndex
53
55 virtual LedgerIndex
57
59 virtual int
60 fdRequired() const = 0;
61
79 minimumOnline() const = 0;
80};
81
82//------------------------------------------------------------------------------
83
86} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
Scheduling for asynchronous backend activity.
class to create database, launch online delete thread, and related SQLite database
Definition SHAMapStore.h:17
virtual void stop()=0
virtual LedgerIndex getCanDelete()=0
Highest ledger that may be deleted.
virtual ~SHAMapStore()=default
virtual std::unique_ptr< NodeStore::Database > makeNodeStore(int readThreads)=0
virtual std::optional< LedgerIndex > minimumOnline() const =0
The minimum ledger to try and maintain in our database.
virtual bool advisoryDelete() const =0
Whether advisory delete is enabled.
virtual LedgerIndex getLastRotated()=0
Maximum ledger that has been deleted, or will be deleted if currently in the act of online deletion.
virtual std::uint32_t clampFetchDepth(std::uint32_t fetch_depth) const =0
virtual LedgerIndex setCanDelete(LedgerIndex canDelete)=0
Highest ledger that may be deleted.
virtual void start()=0
virtual void onLedgerClosed(std::shared_ptr< Ledger const > const &ledger)=0
Called by LedgerMaster every time a ledger validates.
virtual void rendezvous() const =0
virtual int fdRequired() const =0
Returns the number of file descriptors that are needed.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
std::unique_ptr< SHAMapStore > make_SHAMapStore(Application &app, NodeStore::Scheduler &scheduler, beast::Journal journal)