xrpld
Loading...
Searching...
No Matches
DatabaseRotating.h
1#pragma once
2
3#include <xrpl/nodestore/Database.h>
4
5namespace xrpl::NodeStore {
6
7/* This class has two key-value store Backend objects for persisting SHAMap
8 * records. This facilitates online deletion of data. New backends are
9 * rotated in. Old ones are rotated out and deleted.
10 */
11
13{
14public:
16 Scheduler& scheduler,
17 int readThreads,
18 Section const& config,
19 beast::Journal journal)
20 : Database(scheduler, readThreads, config, journal)
21 {
22 }
23
31 virtual void
34 std::function<void(std::string const& writableName, std::string const& archiveName)> const&
35 f) = 0;
36};
37
38} // namespace xrpl::NodeStore
A generic endpoint for log messages.
Definition Journal.h:38
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)
Scheduling for asynchronous backend activity.
Holds a collection of configuration values.
Definition BasicConfig.h:24