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

Metadata for a Fixed slot. More...

#include <Fixed.h>

Collaboration diagram for xrpl::peer_finder::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 15 of file Fixed.h.

Constructor & Destructor Documentation

◆ Fixed() [1/2]

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

Definition at line 18 of file Fixed.h.

◆ Fixed() [2/2]

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

Member Function Documentation

◆ when()

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

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

Definition at line 28 of file Fixed.h.

◆ failure()

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

Updates metadata to reflect a failed connection.

Definition at line 37 of file Fixed.h.

◆ success()

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

Updates metadata to reflect a successful connection.

Definition at line 47 of file Fixed.h.

Member Data Documentation

◆ when_

clock_type::time_point xrpl::peer_finder::Fixed::when_
private

Definition at line 54 of file Fixed.h.

◆ failures_

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

Definition at line 55 of file Fixed.h.