|
xrpld
|
The Livecache holds the short-lived relayed Endpoint messages. More...
#include <Livecache.h>


Classes | |
| class | HopsT |
Public Types | |
| using | allocator_type = Allocator |
Public Member Functions | |
| Livecache (clock_type &clock, beast::Journal journal, Allocator alloc=Allocator()) | |
| Create the cache. | |
| bool | empty () const |
| Returns true if the cache is empty. | |
| cache_type::size_type | size () const |
| Returns the number of entries in the cache. | |
| void | expire () |
| Erase entries whose time has expired. | |
| void | insert (Endpoint const &ep) |
| Creates or updates an existing Element based on a new message. | |
| void | onWrite (beast::PropertyStream::Map &map) |
| Output statistics. | |
Public Attributes | |
| class xrpl::peer_finder::Livecache::HopsT | hops |
Protected Types | |
| using | list_type |
Static Protected Member Functions | |
| template<bool IsConst> | |
| static Hop< IsConst > | makeHop (beast::MaybeConst< IsConst, list_type >::type &list) |
Private Types | |
| using | cache_type |
Private Attributes | |
| beast::Journal | journal_ |
| cache_type | cache_ |
The Livecache holds the short-lived relayed Endpoint messages.
Since peers only advertise themselves when they have open slots, we want these messages to expire rather quickly after the peer becomes full.
Addresses added to the cache are not connection-tested to see if they are connectable (with one small exception regarding neighbors). Therefore, these addresses are not suitable for persisting across launches or for bootstrapping, because they do not have verifiable and locally observed uptime and connectability information.
Definition at line 187 of file Livecache.h.
|
private |
Definition at line 190 of file Livecache.h.
| using xrpl::peer_finder::Livecache< Allocator >::allocator_type = Allocator |
Definition at line 201 of file Livecache.h.
|
protectedinherited |
Definition at line 54 of file Livecache.h.
| xrpl::peer_finder::Livecache< Allocator >::Livecache | ( | clock_type & | clock, |
| beast::Journal | journal, | ||
| Allocator | alloc = Allocator() ) |
Create the cache.
Definition at line 392 of file Livecache.h.
|
nodiscard |
Returns true if the cache is empty.
Definition at line 356 of file Livecache.h.
| cache_type::size_type xrpl::peer_finder::Livecache< Allocator >::size | ( | ) | const |
Returns the number of entries in the cache.
Definition at line 365 of file Livecache.h.
| void xrpl::peer_finder::Livecache< Allocator >::expire | ( | ) |
Erase entries whose time has expired.
Definition at line 399 of file Livecache.h.
| void xrpl::peer_finder::Livecache< Allocator >::insert | ( | Endpoint const & | ep | ) |
Creates or updates an existing Element based on a new message.
Definition at line 421 of file Livecache.h.
| void xrpl::peer_finder::Livecache< Allocator >::onWrite | ( | beast::PropertyStream::Map & | map | ) |
Output statistics.
Definition at line 468 of file Livecache.h.
|
staticprotectedinherited |
Definition at line 163 of file Livecache.h.
|
private |
Definition at line 197 of file Livecache.h.
|
private |
Definition at line 198 of file Livecache.h.
| class xrpl::peer_finder::Livecache::HopsT xrpl::peer_finder::Livecache< Allocator >::hops |