20 #ifndef RIPPLE_PEERFINDER_STORESQDB_H_INCLUDED
21 #define RIPPLE_PEERFINDER_STORESQDB_H_INCLUDED
23 #include <ripple/app/rdb/PeerFinder.h>
24 #include <ripple/basics/contract.h>
25 #include <ripple/core/SociDB.h>
26 #include <ripple/peerfinder/impl/Store.h>
27 #include <boost/optional.hpp>
30 namespace PeerFinder {
73 if (!is_unspecified(endpoint))
75 cb(endpoint, valence);
81 <<
"Bad address string '" << s <<
"' in Bootcache table";
StoreSqdb(beast::Journal journal=beast::Journal{beast::Journal::getNullSink()})
void initPeerFinderDB(soci::session &session, BasicConfig const &config, beast::Journal j)
initPeerFinderDB Opens a session with the peer finder database.
Database persistence for PeerFinder using SQLite.
void updatePeerFinderDB(soci::session &session, int currentSchemaVersion, beast::Journal j)
updatePeerFinderDB Updates the peer finder database to a new version.
Abstract persistence for PeerFinder data.
void save(std::vector< Entry > const &v) override
static Sink & getNullSink()
Returns a Sink which does nothing.
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...
A generic endpoint for log messages.
void init(BasicConfig const &config)
void open(BasicConfig const &config)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static Endpoint from_string(std::string const &s)
void savePeerFinderDB(soci::session &session, std::vector< PeerFinder::Store::Entry > const &v)
savePeerFinderDB Saves a new entry to the peer finder database.
A version-independent IP address and port combination.
std::size_t load(load_callback const &cb) override
Holds unparsed configuration information.