rippled
Loading...
Searching...
No Matches
SHAMapStore.h
1#ifndef XRPL_APP_MISC_SHAMAPSTORE_H_INCLUDED
2#define XRPL_APP_MISC_SHAMAPSTORE_H_INCLUDED
3
4#include <xrpld/app/ledger/Ledger.h>
5
6#include <xrpl/nodestore/Manager.h>
7
8#include <optional>
9
10namespace ripple {
11
12class TransactionMaster;
13
19{
20public:
21 virtual ~SHAMapStore() = default;
22
24 virtual void
26
27 virtual void
28 start() = 0;
29
30 virtual void
31 rendezvous() const = 0;
32
33 virtual void
34 stop() = 0;
35
36 virtual std::uint32_t
37 clampFetchDepth(std::uint32_t fetch_depth) const = 0;
38
40 makeNodeStore(int readThreads) = 0;
41
43 virtual LedgerIndex
44 setCanDelete(LedgerIndex canDelete) = 0;
45
47 virtual bool
48 advisoryDelete() const = 0;
49
53 virtual LedgerIndex
55
57 virtual LedgerIndex
59
61 virtual int
62 fdRequired() const = 0;
63
81 minimumOnline() const = 0;
82};
83
84//------------------------------------------------------------------------------
85
88 Application& app,
89 NodeStore::Scheduler& scheduler,
90 beast::Journal journal);
91} // namespace ripple
92
93#endif
A generic endpoint for log messages.
Definition Journal.h:41
Scheduling for asynchronous backend activity.
class to create database, launch online delete thread, and related SQLite database
Definition SHAMapStore.h:19
virtual void start()=0
virtual LedgerIndex setCanDelete(LedgerIndex canDelete)=0
Highest ledger that may be deleted.
virtual void onLedgerClosed(std::shared_ptr< Ledger const > const &ledger)=0
Called by LedgerMaster every time a ledger validates.
virtual void stop()=0
virtual std::uint32_t clampFetchDepth(std::uint32_t fetch_depth) const =0
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 ~SHAMapStore()=default
virtual int fdRequired() const =0
Returns the number of file descriptors that are needed.
virtual LedgerIndex getCanDelete()=0
Highest ledger that may be deleted.
virtual void rendezvous() const =0
virtual std::optional< LedgerIndex > minimumOnline() const =0
The minimum ledger to try and maintain in our database.
virtual std::unique_ptr< NodeStore::Database > makeNodeStore(int readThreads)=0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::unique_ptr< SHAMapStore > make_SHAMapStore(Application &app, NodeStore::Scheduler &scheduler, beast::Journal journal)