xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
nodestore
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/context.hpp>
8
9
#include <
cstddef
>
10
#include <
memory
>
11
#include <
string
>
12
13
namespace
xrpl
{
14
class
Section
;
15
}
// namespace xrpl
16
17
namespace
xrpl::node_store
{
18
22
class
Factory
23
{
24
public
:
25
virtual
~Factory
() =
default
;
26
30
[[nodiscard]]
virtual
std::string
31
getName
()
const
= 0;
32
42
virtual
std::unique_ptr<Backend>
43
createInstance
(
44
size_t
keyBytes,
45
Section
const
& parameters,
46
std::size_t
burstSize,
47
Scheduler
& scheduler,
48
beast::Journal
journal) = 0;
49
60
virtual
std::unique_ptr<Backend>
61
createInstance
(
62
size_t
keyBytes,
63
Section
const
& parameters,
64
std::size_t
burstSize,
65
Scheduler
& scheduler,
66
nudb::context& context,
67
beast::Journal
journal)
68
{
69
return
{};
70
}
71
};
72
73
}
// namespace xrpl::node_store
std::string
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
xrpl::Section
Holds a collection of configuration values.
Definition
BasicConfig.h:28
xrpl::node_store::Factory
Base class for backend factories.
Definition
Factory.h:23
xrpl::node_store::Factory::createInstance
virtual std::unique_ptr< Backend > createInstance(size_t keyBytes, Section const ¶meters, std::size_t burstSize, Scheduler &scheduler, nudb::context &context, beast::Journal journal)
Create an instance of this factory's backend.
Definition
Factory.h:61
xrpl::node_store::Factory::~Factory
virtual ~Factory()=default
xrpl::node_store::Factory::createInstance
virtual std::unique_ptr< Backend > createInstance(size_t keyBytes, Section const ¶meters, std::size_t burstSize, Scheduler &scheduler, beast::Journal journal)=0
Create an instance of this factory's backend.
xrpl::node_store::Factory::getName
virtual std::string getName() const =0
Retrieve the name of this factory.
xrpl::node_store::Scheduler
Scheduling for asynchronous backend activity.
Definition
include/xrpl/nodestore/Scheduler.h:46
cstddef
memory
xrpl::node_store
Definition
ServiceRegistry.h:18
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
std::size_t
string
std::unique_ptr
Generated by
1.17.0