xrpld
Loading...
Searching...
No Matches
xrpl::PeerFinder::Fixed Class Reference

Metadata for a Fixed slot. More...

#include <Fixed.h>

Collaboration diagram for xrpl::PeerFinder::Fixed:

Public Member Functions

 Fixed (clock_type &clock)
 Fixed (Fixed const &)=default
clock_type::time_point const & when () const
 Returns the time after which we should allow a connection attempt.
void failure (clock_type::time_point const &now)
 Updates metadata to reflect a failed connection.
void success (clock_type::time_point const &now)
 Updates metadata to reflect a successful connection.

Private Attributes

clock_type::time_point when_
std::size_t failures_ {0}

Detailed Description

Metadata for a Fixed slot.

Definition at line 8 of file Fixed.h.

Constructor & Destructor Documentation

◆ Fixed() [1/2]

xrpl::PeerFinder::Fixed::Fixed ( clock_type & clock)
explicit

Definition at line 11 of file Fixed.h.

◆ Fixed() [2/2]

xrpl::PeerFinder::Fixed::Fixed ( Fixed const & )
default

Member Function Documentation

◆ when()

clock_type::time_point const & xrpl::PeerFinder::Fixed::when ( ) const
nodiscard

Returns the time after which we should allow a connection attempt.

Definition at line 19 of file Fixed.h.

◆ failure()

void xrpl::PeerFinder::Fixed::failure ( clock_type::time_point const & now)

Updates metadata to reflect a failed connection.

Definition at line 26 of file Fixed.h.

◆ success()

void xrpl::PeerFinder::Fixed::success ( clock_type::time_point const & now)

Updates metadata to reflect a successful connection.

Definition at line 34 of file Fixed.h.

Member Data Documentation

◆ when_

clock_type::time_point xrpl::PeerFinder::Fixed::when_
private

Definition at line 41 of file Fixed.h.

◆ failures_

std::size_t xrpl::PeerFinder::Fixed::failures_ {0}
private

Definition at line 42 of file Fixed.h.