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:
16 DatabaseRotating(Scheduler& scheduler, int readThreads, Section const& config, beast::Journal journal)
17 : Database(scheduler, readThreads, config, journal)
18 {
19 }
20
28 virtual void
31 std::function<void(std::string const& writableName, std::string const& archiveName)> const& f) = 0;
32};
33
34} // namespace NodeStore
35} // 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