rippled
Public Member Functions | Public Attributes | List of all members
ripple::detail::PeerDataCounts Struct Reference
Collaboration diagram for ripple::detail::PeerDataCounts:
Collaboration graph
[legend]

Public Member Functions

void update (std::shared_ptr< Peer > &&peer, int dataCount)
 
void prune ()
 
template<class F >
void sampleN (std::size_t n, F &&f)
 

Public Attributes

std::unordered_map< std::shared_ptr< Peer >, int > counts
 
int maxCount = 0
 

Detailed Description

Definition at line 1236 of file InboundLedger.cpp.

Member Function Documentation

◆ update()

void ripple::detail::PeerDataCounts::update ( std::shared_ptr< Peer > &&  peer,
int  dataCount 
)

Definition at line 1245 of file InboundLedger.cpp.

◆ prune()

void ripple::detail::PeerDataCounts::prune ( )

Definition at line 1261 of file InboundLedger.cpp.

◆ sampleN()

template<class F >
void ripple::detail::PeerDataCounts::sampleN ( std::size_t  n,
F &&  f 
)

Definition at line 1280 of file InboundLedger.cpp.

Member Data Documentation

◆ counts

std::unordered_map<std::shared_ptr<Peer>, int> ripple::detail::PeerDataCounts::counts

Definition at line 1239 of file InboundLedger.cpp.

◆ maxCount

int ripple::detail::PeerDataCounts::maxCount = 0

Definition at line 1241 of file InboundLedger.cpp.