|
CatapultServer
v0.5.0.1 (Elephant)
|
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 |
Counters for tracking how often an account is used.
| catapult::cache::AccountCounters::AccountCounters | ( | ) |
Creates account counters.
| size_t catapult::cache::AccountCounters::count | ( | const Key & | key | ) | const |
Gets the use count for the account with public key.
| void catapult::cache::AccountCounters::decrement | ( | const Key & | key | ) |
Decreases the use count for the account with public key.
| size_t catapult::cache::AccountCounters::deepSize | ( | ) | const |
Gets the sum of all use counts.
| void catapult::cache::AccountCounters::increment | ( | const Key & | key | ) |
Increases the use count for the account with public key.
| void catapult::cache::AccountCounters::reset | ( | ) |
Resets the counters.
| size_t catapult::cache::AccountCounters::size | ( | ) | const |
Gets the number of unique accounts used.
|
private |
|
private |