xrpld
Loading...
Searching...
No Matches
Factory.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/nodestore/Backend.h>
5#include <xrpl/nodestore/Scheduler.h>
6
7#include <nudb/store.hpp>
8
9namespace xrpl {
10class Section;
11} // namespace xrpl
12
13namespace xrpl::NodeStore {
14
17{
18public:
19 virtual ~Factory() = default;
20
22 [[nodiscard]] virtual std::string
23 getName() const = 0;
24
35 size_t keyBytes,
36 Section const& parameters,
37 std::size_t burstSize,
38 Scheduler& scheduler,
39 beast::Journal journal) = 0;
40
52 size_t keyBytes,
53 Section const& parameters,
54 std::size_t burstSize,
55 Scheduler& scheduler,
56 nudb::context& context,
57 beast::Journal journal)
58 {
59 return {};
60 }
61};
62
63} // namespace xrpl::NodeStore
A generic endpoint for log messages.
Definition Journal.h:38
Base class for backend factories.
Definition Factory.h:17
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:51
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