1#include <xrpl/nodestore/detail/DatabaseNodeImp.h>
2#include <xrpl/nodestore/detail/ManagerImp.h>
4#include <boost/algorithm/string/predicate.hpp>
20 Throw<std::runtime_error>(
21 "Your rippled.cfg is missing a [node_db] entry, "
22 "please see the rippled-example.cfg file!");
57 auto factory{
find(type)};
63 return factory->createInstance(
78 scheduler, readThreads, std::move(backend), config, journal);
85 list_.push_back(&factory);
94 return other == &factory;
98 "ripple::NodeStore::ManagerImp::erase : valid input");
108 return boost::iequals(name, other->getName());
110 if (iter ==
list_.end())
A generic endpoint for log messages.
static constexpr std::size_t keyBytes
Base class for backend factories.
Factory * find(std::string const &name) override
Return a pointer to the matching factory if it exists.
std::vector< Factory * > list_
std::unique_ptr< Database > make_Database(std::size_t burstSize, Scheduler &scheduler, int readThreads, Section const &config, beast::Journal journal) override
Construct a NodeStore database.
static ManagerImp & instance()
void insert(Factory &factory) override
Add a factory.
static void missing_backend()
std::unique_ptr< Backend > make_Backend(Section const ¶meters, std::size_t burstSize, Scheduler &scheduler, beast::Journal journal) override
Create a backend.
void erase(Factory &factory) override
Remove a factory.
Singleton for managing NodeStore factories and back ends.
static Manager & instance()
Returns the instance of the manager singleton.
Scheduling for asynchronous backend activity.
Holds a collection of configuration values.
void registerRocksDBFactory(Manager &manager)
void registerNuDBFactory(Manager &manager)
void registerMemoryFactory(Manager &manager)
void registerNullFactory(Manager &manager)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
T get(Section const §ion, std::string const &name, T const &defaultValue=T{})
Retrieve a key/value pair from a section.