rippled
Loading...
Searching...
No Matches
Factory.h
1#pragma once
2
3#include <xrpl/basics/BasicConfig.h>
4#include <xrpl/beast/utility/Journal.h>
5#include <xrpl/nodestore/Backend.h>
6#include <xrpl/nodestore/Scheduler.h>
7
8#include <nudb/store.hpp>
9
10namespace xrpl {
11
12namespace NodeStore {
13
16{
17public:
18 virtual ~Factory() = default;
19
21 virtual std::string
22 getName() const = 0;
23
34 size_t keyBytes,
35 Section const& parameters,
37 Scheduler& scheduler,
38 beast::Journal journal) = 0;
39
51 size_t keyBytes,
52 Section const& parameters,
54 Scheduler& scheduler,
55 nudb::context& context,
56 beast::Journal journal)
57 {
58 return {};
59 }
60};
61
62} // namespace NodeStore
63} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
Base class for backend factories.
Definition Factory.h:16
virtual ~Factory()=default
virtual std::unique_ptr< Backend > createInstance(size_t keyBytes, Section const &parameters, std::size_t burstSize, Scheduler &scheduler, beast::Journal journal)=0
Create an instance of this factory's backend.
virtual std::string getName() const =0
Retrieve the name of this factory.
virtual std::unique_ptr< Backend > createInstance(size_t keyBytes, Section const &parameters, std::size_t burstSize, Scheduler &scheduler, nudb::context &context, beast::Journal journal)
Create an instance of this factory's backend.
Definition Factory.h:50
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