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