1#ifndef XRPL_PEERFINDER_STORESQDB_H_INCLUDED
2#define XRPL_PEERFINDER_STORESQDB_H_INCLUDED
4#include <xrpld/app/rdb/PeerFinder.h>
5#include <xrpld/core/SociDB.h>
6#include <xrpld/peerfinder/detail/Store.h>
52 if (!is_unspecified(endpoint))
54 cb(endpoint, valence);
60 <<
"Bad address string '" << s <<
"' in Bootcache table";
A version-independent IP address and port combination.
static Endpoint from_string(std::string const &s)
A generic endpoint for log messages.
static Sink & getNullSink()
Returns a Sink which does nothing.
Holds unparsed configuration information.
Database persistence for PeerFinder using SQLite.
std::size_t load(load_callback const &cb) override
void save(std::vector< Entry > const &v) override
void open(BasicConfig const &config)
void init(BasicConfig const &config)
StoreSqdb(beast::Journal journal=beast::Journal{beast::Journal::getNullSink()})
Abstract persistence for PeerFinder data.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void readPeerFinderDB(soci::session &session, std::function< void(std::string const &, int)> const &func)
readPeerFinderDB Reads all entries from the peer finder database and invokes the given callback for e...
void updatePeerFinderDB(soci::session &session, int currentSchemaVersion, beast::Journal j)
updatePeerFinderDB Updates the peer finder database to a new version.
void initPeerFinderDB(soci::session &session, BasicConfig const &config, beast::Journal j)
initPeerFinderDB Opens a session with the peer finder database.
void savePeerFinderDB(soci::session &session, std::vector< PeerFinder::Store::Entry > const &v)
savePeerFinderDB Saves a new entry to the peer finder database.