|
rippled
|
The Livecache holds the short-lived relayed Endpoint messages. More...

Classes | |
| class | hops_t |
Public Types | |
| using | allocator_type = Allocator |
Public Member Functions | |
| Livecache (clock_type &clock, beast::Journal journal, Allocator alloc=Allocator()) | |
| Create the cache. More... | |
| bool | empty () const |
Returns true if the cache is empty. More... | |
| cache_type::size_type | size () const |
| Returns the number of entries in the cache. More... | |
| void | expire () |
| Erase entries whose time has expired. More... | |
| void | insert (Endpoint const &ep) |
| Creates or updates an existing Element based on a new message. More... | |
| void | onWrite (beast::PropertyStream::Map &map) |
| Output statistics. More... | |
Public Attributes | |
| class ripple::PeerFinder::Livecache::hops_t | hops |
Private Types | |
| using | cache_type = beast::aged_map< beast::IP::Endpoint, Element, std::chrono::steady_clock, std::less< beast::IP::Endpoint >, Allocator > |
Private Attributes | |
| beast::Journal | m_journal |
| cache_type | m_cache |
The Livecache holds the short-lived relayed Endpoint messages.
Since peers only advertise themselves when they have open slots, we want these messags to expire rather quickly after the peer becomes full.
Addresses added to the cache are not connection-tested to see if they are connectible (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 connectibility information.
Definition at line 39 of file Livecache.h.
|
private |
Definition at line 208 of file Livecache.h.
| using ripple::PeerFinder::Livecache< Allocator >::allocator_type = Allocator |
Definition at line 214 of file Livecache.h.
| ripple::PeerFinder::Livecache< Allocator >::Livecache | ( | clock_type & | clock, |
| beast::Journal | journal, | ||
| Allocator | alloc = Allocator() |
||
| ) |
Create the cache.
Definition at line 406 of file Livecache.h.
| bool ripple::PeerFinder::Livecache< Allocator >::empty | ( | ) | const |
Returns true if the cache is empty.
Definition at line 378 of file Livecache.h.
| cache_type::size_type ripple::PeerFinder::Livecache< Allocator >::size | ( | ) | const |
Returns the number of entries in the cache.
Definition at line 385 of file Livecache.h.
| void ripple::PeerFinder::Livecache< Allocator >::expire |
Erase entries whose time has expired.
Definition at line 416 of file Livecache.h.
| void ripple::PeerFinder::Livecache< Allocator >::insert | ( | Endpoint const & | ep | ) |
Creates or updates an existing Element based on a new message.
Definition at line 438 of file Livecache.h.
| void ripple::PeerFinder::Livecache< Allocator >::onWrite | ( | beast::PropertyStream::Map & | map | ) |
Output statistics.
Definition at line 483 of file Livecache.h.
|
private |
Definition at line 210 of file Livecache.h.
|
private |
Definition at line 211 of file Livecache.h.
| class ripple::PeerFinder::Livecache::hops_t ripple::PeerFinder::Livecache< Allocator >::hops |
1.8.17