CatapultServer  v0.5.0.1 (Elephant)
catapult::state::AccountActivityBuckets Class Reference

Stack of account activity buckets. More...

Collaboration diagram for catapult::state::AccountActivityBuckets:

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
 

Detailed Description

Stack of account activity buckets.

Member Typedef Documentation

◆ ActivityBucketStack

Member Function Documentation

◆ begin()

AccountActivityBuckets::ActivityBucketStack::const_iterator catapult::state::AccountActivityBuckets::begin ( ) const

Returns a const iterator to the first element of the underlying container.

Here is the call graph for this function:

◆ end()

AccountActivityBuckets::ActivityBucketStack::const_iterator catapult::state::AccountActivityBuckets::end ( ) const

Returns a const iterator to the element following the last element of the underlying container.

Here is the call graph for this function:

◆ get()

AccountActivityBuckets::ActivityBucket catapult::state::AccountActivityBuckets::get ( model::ImportanceHeight  height) const

Gets activity bucket at height.

Here is the call graph for this function:

◆ pop()

void catapult::state::AccountActivityBuckets::pop ( )

Pops the current bucket.

Here is the call graph for this function:

◆ tryUpdate() [1/2]

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.

Note
This will never create a new bucket.
Here is the caller graph for this function:

◆ tryUpdate() [2/2]

bool catapult::state::AccountActivityBuckets::tryUpdate ( model::ImportanceHeight  height,
const consumer< HeightDetachedActivityBucket & > &  consumer,
bool  shouldCreateNewBucket 
)
private
Here is the call graph for this function:

◆ update()

void catapult::state::AccountActivityBuckets::update ( model::ImportanceHeight  height,
const consumer< HeightDetachedActivityBucket & > &  consumer 
)

Updates the bucket at height by passing its components to consumer.

Note
This will create a new bucket if one does not exist at height.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_buckets

ActivityBucketStack catapult::state::AccountActivityBuckets::m_buckets
private

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