xrpld
Loading...
Searching...
No Matches
xrpl::CountedObjects Class Reference

Manages all counted object types. More...

#include <CountedObject.h>

Collaboration diagram for xrpl::CountedObjects:

Classes

class  Counter
 Implementation for CountedObject. More...

Public Types

using Entry = std::pair<std::string, int>
using List = std::vector<Entry>

Public Member Functions

List getCounts (int minimumThreshold) const

Static Public Member Functions

static CountedObjectsgetInstance () noexcept

Private Member Functions

 CountedObjects () noexcept
 ~CountedObjects () noexcept=default

Private Attributes

std::atomic< int > count_
std::atomic< Counter * > head_

Detailed Description

Manages all counted object types.

Definition at line 13 of file CountedObject.h.

Member Typedef Documentation

◆ Entry

Definition at line 19 of file CountedObject.h.

◆ List

Definition at line 20 of file CountedObject.h.

Constructor & Destructor Documentation

◆ CountedObjects()

xrpl::CountedObjects::CountedObjects ( )
privatenoexcept

Definition at line 15 of file CountedObject.cpp.

◆ ~CountedObjects()

xrpl::CountedObjects::~CountedObjects ( )
privatedefaultnoexcept

Member Function Documentation

◆ getInstance()

CountedObjects & xrpl::CountedObjects::getInstance ( )
staticnoexcept

Definition at line 8 of file CountedObject.cpp.

◆ getCounts()

CountedObjects::List xrpl::CountedObjects::getCounts ( int minimumThreshold) const
nodiscard

Definition at line 20 of file CountedObject.cpp.

Member Data Documentation

◆ count_

std::atomic<int> xrpl::CountedObjects::count_
private

Definition at line 91 of file CountedObject.h.

◆ head_

std::atomic<Counter*> xrpl::CountedObjects::head_
private

Definition at line 92 of file CountedObject.h.