rippled
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ripple::PeerFinder::SlotImp::recent_t Class Reference
Collaboration diagram for ripple::PeerFinder::SlotImp::recent_t:
Collaboration graph
[legend]

Public Member Functions

 recent_t (clock_type &clock)
 
void insert (beast::IP::Endpoint const &ep, std::uint32_t hops)
 Called for each valid endpoint received for a slot. More...
 
bool filter (beast::IP::Endpoint const &ep, std::uint32_t hops)
 Returns true if we should not send endpoint to the slot. More...
 

Private Member Functions

void expire ()
 

Private Attributes

beast::aged_unordered_map< beast::IP::Endpoint, std::uint32_tcache
 

Friends

class SlotImp
 

Detailed Description

Definition at line 145 of file SlotImp.h.

Constructor & Destructor Documentation

◆ recent_t()

ripple::PeerFinder::SlotImp::recent_t::recent_t ( clock_type clock)
explicit

Definition at line 100 of file SlotImp.cpp.

Member Function Documentation

◆ insert()

void ripple::PeerFinder::SlotImp::recent_t::insert ( beast::IP::Endpoint const &  ep,
std::uint32_t  hops 
)

Called for each valid endpoint received for a slot.

We also insert messages that we send to the slot to prevent sending a slot the same address too frequently.

Definition at line 105 of file SlotImp.cpp.

◆ filter()

bool ripple::PeerFinder::SlotImp::recent_t::filter ( beast::IP::Endpoint const &  ep,
std::uint32_t  hops 
)

Returns true if we should not send endpoint to the slot.

Definition at line 120 of file SlotImp.cpp.

◆ expire()

void ripple::PeerFinder::SlotImp::recent_t::expire ( )
private

Definition at line 132 of file SlotImp.cpp.

Friends And Related Function Documentation

◆ SlotImp

friend class SlotImp
friend

Definition at line 165 of file SlotImp.h.

Member Data Documentation

◆ cache

beast::aged_unordered_map<beast::IP::Endpoint, std::uint32_t> ripple::PeerFinder::SlotImp::recent_t::cache
private

Definition at line 166 of file SlotImp.h.