rippled
Loading...
Searching...
No Matches
SHAMapStore.h
1#pragma once
2
3#include <xrpld/app/ledger/Ledger.h>
4
5#include <xrpl/nodestore/Manager.h>
6
7#include <optional>
8
9namespace xrpl {
10
11class TransactionMaster;
12
18{
19public:
20 virtual ~SHAMapStore() = default;
21
23 virtual void
25
26 virtual void
27 start() = 0;
28
29 virtual void
30 rendezvous() const = 0;
31
32 virtual void
33 stop() = 0;
34
35 virtual std::uint32_t
36 clampFetchDepth(std::uint32_t fetch_depth) const = 0;
37
39 makeNodeStore(int readThreads) = 0;
40
42 virtual LedgerIndex
43 setCanDelete(LedgerIndex canDelete) = 0;
44
46 virtual bool
47 advisoryDelete() const = 0;
48
52 virtual LedgerIndex
54
56 virtual LedgerIndex
58
60 virtual int
61 fdRequired() const = 0;
62
80 minimumOnline() const = 0;
81};
82
83//------------------------------------------------------------------------------
84
87} // 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:18
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)