CatapultServer
v0.5.0.1 (Elephant)
|
Stack of account activity buckets. More...
Classes | |
struct | ActivityBucket |
Temporal activity information including height. More... | |
struct | HeightDetachedActivityBucket |
Temporal activity information excluding height. More... | |
Public Member Functions | |
ActivityBucket | get (model::ImportanceHeight height) const |
Gets activity bucket at height. More... | |
void | update (model::ImportanceHeight height, const consumer< HeightDetachedActivityBucket & > &consumer) |
bool | tryUpdate (model::ImportanceHeight height, const consumer< HeightDetachedActivityBucket & > &consumer) |
void | pop () |
Pops the current bucket. More... | |
ActivityBucketStack::const_iterator | begin () const |
Returns a const iterator to the first element of the underlying container. More... | |
ActivityBucketStack::const_iterator | end () const |
Returns a const iterator to the element following the last element of the underlying container. More... | |
Private Types | |
using | ActivityBucketStack = CompactArrayStack< ActivityBucket, Activity_Bucket_History_Size > |
Private Member Functions | |
bool | tryUpdate (model::ImportanceHeight height, const consumer< HeightDetachedActivityBucket & > &consumer, bool shouldCreateNewBucket) |
Private Attributes | |
ActivityBucketStack | m_buckets |
Stack of account activity buckets.
|
private |
AccountActivityBuckets::ActivityBucketStack::const_iterator catapult::state::AccountActivityBuckets::begin | ( | ) | const |
Returns a const iterator to the first element of the underlying container.
AccountActivityBuckets::ActivityBucketStack::const_iterator catapult::state::AccountActivityBuckets::end | ( | ) | const |
Returns a const iterator to the element following the last element of the underlying container.
AccountActivityBuckets::ActivityBucket catapult::state::AccountActivityBuckets::get | ( | model::ImportanceHeight | height | ) | const |
Gets activity bucket at height.
void catapult::state::AccountActivityBuckets::pop | ( | ) |
Pops the current bucket.
bool catapult::state::AccountActivityBuckets::tryUpdate | ( | model::ImportanceHeight | height, |
const consumer< HeightDetachedActivityBucket & > & | consumer | ||
) |
Tries to update the bucket at height by passing its components to consumer.
|
private |
void catapult::state::AccountActivityBuckets::update | ( | model::ImportanceHeight | height, |
const consumer< HeightDetachedActivityBucket & > & | consumer | ||
) |
Updates the bucket at height by passing its components to consumer.
|
private |