rippled
Loading...
Searching...
No Matches
xrpld
peerfinder
detail
Store.h
1
#ifndef XRPL_PEERFINDER_STORE_H_INCLUDED
2
#define XRPL_PEERFINDER_STORE_H_INCLUDED
3
4
namespace
ripple
{
5
namespace
PeerFinder {
6
8
class
Store
9
{
10
public
:
11
virtual
~Store
()
12
{
13
}
14
15
// load the bootstrap cache
16
using
load_callback
=
std::function
<void(
beast::IP::Endpoint
,
int
)>;
17
virtual
std::size_t
18
load
(
load_callback
const
& cb) = 0;
19
20
// save the bootstrap cache
21
struct
Entry
22
{
23
explicit
Entry
() =
default
;
24
25
beast::IP::Endpoint
endpoint
;
26
int
valence
;
27
};
28
virtual
void
29
save
(
std::vector<Entry>
const
& v) = 0;
30
};
31
32
}
// namespace PeerFinder
33
}
// namespace ripple
34
35
#endif
beast::IP::Endpoint
A version-independent IP address and port combination.
Definition
IPEndpoint.h:19
ripple::PeerFinder::Store
Abstract persistence for PeerFinder data.
Definition
Store.h:9
ripple::PeerFinder::Store::save
virtual void save(std::vector< Entry > const &v)=0
ripple::PeerFinder::Store::~Store
virtual ~Store()
Definition
Store.h:11
ripple::PeerFinder::Store::load
virtual std::size_t load(load_callback const &cb)=0
std::function
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:6
std::size_t
ripple::PeerFinder::Store::Entry
Definition
Store.h:22
ripple::PeerFinder::Store::Entry::endpoint
beast::IP::Endpoint endpoint
Definition
Store.h:25
ripple::PeerFinder::Store::Entry::valence
int valence
Definition
Store.h:26
ripple::PeerFinder::Store::Entry::Entry
Entry()=default
std::vector
Generated by
1.9.8