CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
24 #include <unordered_map>
26 namespace catapult {
namespace cache {
void decrement(const Key &key)
Decreases the use count for the account with public key.
Definition: AccountCounters.cpp:48
size_t size() const
Gets the number of unique accounts used.
Definition: AccountCounters.cpp:30
size_t m_totalUseCount
Definition: AccountCounters.h:56
void reset()
Resets the counters.
Definition: AccountCounters.cpp:60
#define CATAPULT_THROW_RUNTIME_ERROR_1(MESSAGE, PARAM1)
Macro used to throw a catapult runtime error with a single parameter.
Definition: exceptions.h:171
void increment(const Key &key)
Increases the use count for the account with public key.
Definition: AccountCounters.cpp:43
AccountCounters()
Creates account counters.
Definition: AccountCounters.cpp:27
size_t deepSize() const
Gets the sum of all use counts.
Definition: AccountCounters.cpp:34
std::unordered_map< Key, size_t, utils::ArrayHasher< Key > > m_accountCounters
Definition: AccountCounters.h:55
size_t count(const Key &key) const
Gets the use count for the account with public key.
Definition: AccountCounters.cpp:38
Definition: AddressExtractionExtension.cpp:28
Counters for tracking how often an account is used.
Definition: AccountCounters.h:29