CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::AccountCounters Class Reference

Counters for tracking how often an account is used. More...

Public Member Functions

 AccountCounters ()
 Creates account counters. More...
 
size_t size () const
 Gets the number of unique accounts used. More...
 
size_t deepSize () const
 Gets the sum of all use counts. More...
 
size_t count (const Key &key) const
 Gets the use count for the account with public key. More...
 
void increment (const Key &key)
 Increases the use count for the account with public key. More...
 
void decrement (const Key &key)
 Decreases the use count for the account with public key. More...
 
void reset ()
 Resets the counters. More...
 

Private Attributes

std::unordered_map< Key, size_t, utils::ArrayHasher< Key > > m_accountCounters
 
size_t m_totalUseCount
 

Detailed Description

Counters for tracking how often an account is used.

Constructor & Destructor Documentation

◆ AccountCounters()

catapult::cache::AccountCounters::AccountCounters ( )

Creates account counters.

Member Function Documentation

◆ count()

size_t catapult::cache::AccountCounters::count ( const Key key) const

Gets the use count for the account with public key.

◆ decrement()

void catapult::cache::AccountCounters::decrement ( const Key key)

Decreases the use count for the account with public key.

◆ deepSize()

size_t catapult::cache::AccountCounters::deepSize ( ) const

Gets the sum of all use counts.

◆ increment()

void catapult::cache::AccountCounters::increment ( const Key key)

Increases the use count for the account with public key.

◆ reset()

void catapult::cache::AccountCounters::reset ( )

Resets the counters.

◆ size()

size_t catapult::cache::AccountCounters::size ( ) const

Gets the number of unique accounts used.

Member Data Documentation

◆ m_accountCounters

std::unordered_map<Key, size_t, utils::ArrayHasher<Key> > catapult::cache::AccountCounters::m_accountCounters
private

◆ m_totalUseCount

size_t catapult::cache::AccountCounters::m_totalUseCount
private

The documentation for this class was generated from the following files: