rippled
Loading...
Searching...
No Matches
Factory.h
1#ifndef XRPL_NODESTORE_FACTORY_H_INCLUDED
2#define XRPL_NODESTORE_FACTORY_H_INCLUDED
3
4#include <xrpl/basics/BasicConfig.h>
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/nodestore/Backend.h>
7#include <xrpl/nodestore/Scheduler.h>
8
9#include <nudb/store.hpp>
10
11namespace ripple {
12
13namespace NodeStore {
14
17{
18public:
19 virtual ~Factory() = default;
20
22 virtual std::string
23 getName() const = 0;
24
35 size_t keyBytes,
36 Section const& parameters,
38 Scheduler& scheduler,
39 beast::Journal journal) = 0;
40
52 size_t keyBytes,
53 Section const& parameters,
55 Scheduler& scheduler,
56 nudb::context& context,
57 beast::Journal journal)
58 {
59 return {};
60 }
61};
62
63} // namespace NodeStore
64} // namespace ripple
65
66#endif
A generic endpoint for log messages.
Definition Journal.h:41
Base class for backend factories.
Definition Factory.h:17
virtual std::string getName() const =0
Retrieve the name of this factory.
virtual ~Factory()=default
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
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.
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