3#include <xrpld/peerfinder/detail/SlotImp.h>
4#include <xrpld/peerfinder/detail/Tuning.h>
6#include <xrpl/beast/container/aged_set.h>
7#include <xrpl/beast/utility/instrumentation.h>
22template <
class Target,
class HopContainer>
26 XRPL_ASSERT(!t.full(),
"xrpl::PeerFinder::detail::handoutOne : target is not full");
27 for (
auto it = h.begin(); it != h.end(); ++it)
45template <
class TargetFwdIter,
class SeqFwdIter>
47handout(TargetFwdIter first, TargetFwdIter last, SeqFwdIter seqFirst, SeqFwdIter seqLast)
52 for (
auto si = seqFirst; si != seqLast; ++si)
56 for (
auto ti = first; ti != last; ++ti)
81 template <
class =
void>
84 template <
class =
void>
165 template <
class =
void>
168 template <
class =
void>
261 template <
class =
void>
264 template <
class =
void>
271 return list_.empty();
303 list_.reserve(needed);
328 list_.push_back(endpoint);
A version-independent IP address and port combination.
Address const & address() const
Returns the address portion of this endpoint.
std::vector< beast::IP::Endpoint > list_type
bool tryInsert(beast::IP::Endpoint const &endpoint)
list_type const & list() const
ConnectHandouts(std::size_t needed, Squelches &squelches)
bool tryInsert(Endpoint const &endpoint)
beast::aged_set< beast::IP::Address > Squelches
std::vector< Endpoint > & list()
bool tryInsert(Endpoint const &ep)
RedirectHandouts(SlotImp::ptr slot)
std::vector< Endpoint > const & list() const
std::vector< Endpoint > list_
SlotImp::ptr const & slot() const
std::vector< Endpoint > const & list() const
SlotHandouts(SlotImp::ptr slot)
bool tryInsert(Endpoint const &ep)
void insert(Endpoint const &ep)
std::vector< Endpoint > list_
SlotImp::ptr const & slot() const
std::shared_ptr< SlotImp > ptr
detail::AgedOrderedContainer< false, false, Key, void, Clock, Compare, Allocator > aged_set
constexpr std::uint32_t kMaxHops
constexpr std::uint32_t kNumberOfEndpoints
constexpr std::uint32_t kRedirectEndpointCount
std::size_t handoutOne(Target &t, HopContainer &h)
Try to insert one object in the target.
void handout(TargetFwdIter first, TargetFwdIter last, SeqFwdIter seqFirst, SeqFwdIter seqLast)
Distributes objects to targets according to business rules.
Describes a connectable peer address along with some metadata.
beast::IP::Endpoint address