xrpld
Loading...
Searching...
No Matches
xrpl::Resource::Entry Struct Reference

#include <Entry.h>

Inheritance diagram for xrpl::Resource::Entry:
Collaboration diagram for xrpl::Resource::Entry:

Public Member Functions

 Entry ()=delete
 Entry (clock_type::time_point const now)
std::string toString () const
bool isUnlimited () const
 Returns true if this connection should have no resource limits applied–it is still possible for certain RPC commands to be forbidden, but that depends on Role.
int balance (clock_type::time_point const now)
int add (int charge, clock_type::time_point const now)

Public Attributes

std::optional< PublicKeypublicKey
Key const * key {}
int refcount
DecayingSample< kDecayWindowSeconds, clock_typelocalBalance
int remoteBalance
clock_type::time_point lastWarningTime
clock_type::time_point whenExpires

Private Types

using value_type = T

Private Attributes

friend T
ListNodenext_ = nullptr
ListNodeprev_ = nullptr

Detailed Description

Definition at line 16 of file Entry.h.

Member Typedef Documentation

◆ value_type

template<typename T, typename Tag>
using beast::detail::ListNode< T, Tag >::value_type = T
privateinherited

Definition at line 40 of file List.h.

Constructor & Destructor Documentation

◆ Entry() [1/2]

xrpl::Resource::Entry::Entry ( )
delete

◆ Entry() [2/2]

xrpl::Resource::Entry::Entry ( clock_type::time_point const now)
explicit
Parameters
nowConstruction time of Entry.

Definition at line 23 of file Entry.h.

Member Function Documentation

◆ toString()

std::string xrpl::Resource::Entry::toString ( ) const
nodiscard

Definition at line 29 of file Entry.h.

◆ isUnlimited()

bool xrpl::Resource::Entry::isUnlimited ( ) const
nodiscard

Returns true if this connection should have no resource limits applied–it is still possible for certain RPC commands to be forbidden, but that depends on Role.

Definition at line 40 of file Entry.h.

◆ balance()

int xrpl::Resource::Entry::balance ( clock_type::time_point const now)

Definition at line 47 of file Entry.h.

◆ add()

int xrpl::Resource::Entry::add ( int charge,
clock_type::time_point const now )

Definition at line 55 of file Entry.h.

Member Data Documentation

◆ publicKey

std::optional<PublicKey> xrpl::Resource::Entry::publicKey

Definition at line 61 of file Entry.h.

◆ key

Key const* xrpl::Resource::Entry::key {}

Definition at line 64 of file Entry.h.

◆ refcount

int xrpl::Resource::Entry::refcount

Definition at line 67 of file Entry.h.

◆ localBalance

DecayingSample<kDecayWindowSeconds, clock_type> xrpl::Resource::Entry::localBalance

Definition at line 70 of file Entry.h.

◆ remoteBalance

int xrpl::Resource::Entry::remoteBalance

Definition at line 73 of file Entry.h.

◆ lastWarningTime

clock_type::time_point xrpl::Resource::Entry::lastWarningTime

Definition at line 76 of file Entry.h.

◆ whenExpires

clock_type::time_point xrpl::Resource::Entry::whenExpires

Definition at line 79 of file Entry.h.

◆ T

template<typename T, typename Tag>
friend beast::detail::ListNode< T, Tag >::T
privateinherited

Definition at line 42 of file List.h.

◆ next_

template<typename T, typename Tag>
ListNode* beast::detail::ListNode< T, Tag >::next_ = nullptr
privateinherited

Definition at line 48 of file List.h.

◆ prev_

template<typename T, typename Tag>
ListNode* beast::detail::ListNode< T, Tag >::prev_ = nullptr
privateinherited

Definition at line 49 of file List.h.