|
xrpld
|
Manages the count of available connections for the various slots. More...
#include <Counts.h>

Public Member Functions | |
| void | add (Slot const &s) |
| Adds the slot state and properties to the slot counts. | |
| void | remove (Slot const &s) |
| Removes the slot state and properties from the slot counts. | |
| bool | canActivate (Slot const &s) const |
| Returns true if the slot can become active. | |
| std::size_t | attemptsNeeded () const |
| Returns the number of attempts needed to bring us to the max. | |
| std::size_t | attempts () const |
| Returns the number of outbound connection attempts. | |
| int | outMax () const |
| Returns the total number of outbound slots. | |
| int | outActive () const |
| Returns the number of outbound peers assigned an open slot. | |
| std::size_t | fixed () const |
| Returns the number of fixed connections. | |
| std::size_t | fixedActive () const |
| Returns the number of active fixed connections. | |
| void | onConfig (Config const &config) |
| Called when the config is set or changed. | |
| int | acceptCount () const |
| Returns the number of accepted connections that haven't handshaked. | |
| int | connectCount () const |
| Returns the number of connection attempts currently active. | |
| int | closingCount () const |
| Returns the number of connections that are gracefully closing. | |
| int | inMax () const |
| Returns the total number of inbound slots. | |
| int | inboundActive () const |
| Returns the number of inbound peers assigned an open slot. | |
| int | totalActive () const |
| Returns the total number of active peers excluding fixed peers. | |
| int | inboundSlotsFree () const |
| Returns the number of unused inbound slots. | |
| int | outboundSlotsFree () const |
| Returns the number of unused outbound slots. | |
| bool | isConnectedToNetwork () const |
| Returns true if the slot logic considers us "connected" to the network. | |
| void | onWrite (beast::PropertyStream::Map &map) const |
| Output statistics. | |
| std::string | stateString () const |
| Records the state for diagnostics. | |
Private Member Functions | |
| void | adjust (Slot const &s, CountAdjustment const dir) |
Static Private Member Functions | |
| template<typename T> | |
| static void | adjustCounter (T &counter, CountAdjustment dir) |
| Increments or decrements a counter based on the adjustment direction. | |
Private Attributes | |
| int | attempts_ {0} |
| Outbound connection attempts. | |
| std::size_t | active_ {0} |
| Active connections, including fixed and reserved. | |
| std::size_t | inMax_ {0} |
| Total number of inbound slots. | |
| std::size_t | inActive_ {0} |
| Number of inbound slots assigned to active peers. | |
| std::size_t | outMax_ {0} |
| Maximum desired outbound slots. | |
| std::size_t | outActive_ {0} |
| Active outbound slots. | |
| std::size_t | fixed_ {0} |
| Fixed connections. | |
| std::size_t | fixedActive_ {0} |
| Active fixed connections. | |
| std::size_t | reserved_ {0} |
| Reserved connections. | |
| int | acceptCount_ {0} |
| int | closingCount_ {0} |
Manages the count of available connections for the various slots.
| void xrpl::PeerFinder::Counts::add | ( | Slot const & | s | ) |
| void xrpl::PeerFinder::Counts::remove | ( | Slot const & | s | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
| void xrpl::PeerFinder::Counts::onConfig | ( | Config const & | config | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
| void xrpl::PeerFinder::Counts::onWrite | ( | beast::PropertyStream::Map & | map | ) | const |
|
nodiscard |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |