rippled
Loading...
Searching...
No Matches
DatabaseRotating.h
1#pragma once
2
3#include <xrpl/nodestore/Database.h>
4
5namespace xrpl {
6namespace NodeStore {
7
8/* This class has two key-value store Backend objects for persisting SHAMap
9 * records. This facilitates online deletion of data. New backends are
10 * rotated in. Old ones are rotated out and deleted.
11 */
12
14{
15public:
17 Scheduler& scheduler,
18 int readThreads,
19 Section const& config,
20 beast::Journal journal)
21 : Database(scheduler, readThreads, config, journal)
22 {
23 }
24
32 virtual void
35 std::function<void(std::string const& writableName, std::string const& archiveName)> const&
36 f) = 0;
37};
38
39} // namespace NodeStore
40} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
virtual void rotate(std::unique_ptr< NodeStore::Backend > &&newBackend, std::function< void(std::string const &writableName, std::string const &archiveName)> const &f)=0
Rotates the backends.
DatabaseRotating(Scheduler &scheduler, int readThreads, Section const &config, beast::Journal journal)
Persistency layer for NodeObject.
Definition Database.h:31
Scheduling for asynchronous backend activity.
Holds a collection of configuration values.
Definition BasicConfig.h:24
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5