CatapultServer  v0.5.0.1 (Elephant)
catapult::sync::RollbackInfo Class Reference

Container for both committed and ignored rollback statistics. More...

Collaboration diagram for catapult::sync::RollbackInfo:

Public Member Functions

 RollbackInfo (const chain::TimeSupplier &timeSupplier, const utils::TimeSpan &recentStatsTimeSpan)
 Creates a container around timeSupplier with recent stats span (recentStatsTimeSpan). More...
 
size_t counter (RollbackResult rollbackResult, RollbackCounterType rollbackCounterType) const
 Returns rollback counter for result (rollbackResult) and counter type (rollbackCounterType). More...
 
void increment ()
 Increments counter. More...
 
void reset ()
 Adds counter to ignored statistics and resets the counter. More...
 
void save ()
 Adds counter to committed statistics and resets the counter. More...
 

Private Member Functions

void prune ()
 

Private Attributes

chain::TimeSupplier m_timeSupplier
 
const utils::TimeSpan m_recentStatsTimeSpan
 
size_t m_currentRollbackSize
 
RollbackStats m_committed
 
RollbackStats m_ignored
 

Detailed Description

Container for both committed and ignored rollback statistics.

Constructor & Destructor Documentation

◆ RollbackInfo()

catapult::sync::RollbackInfo::RollbackInfo ( const chain::TimeSupplier timeSupplier,
const utils::TimeSpan recentStatsTimeSpan 
)
explicit

Creates a container around timeSupplier with recent stats span (recentStatsTimeSpan).

Member Function Documentation

◆ counter()

size_t catapult::sync::RollbackInfo::counter ( RollbackResult  rollbackResult,
RollbackCounterType  rollbackCounterType 
) const

Returns rollback counter for result (rollbackResult) and counter type (rollbackCounterType).

Here is the call graph for this function:

◆ increment()

void catapult::sync::RollbackInfo::increment ( )

Increments counter.

◆ prune()

void catapult::sync::RollbackInfo::prune ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void catapult::sync::RollbackInfo::reset ( )

Adds counter to ignored statistics and resets the counter.

Here is the call graph for this function:

◆ save()

void catapult::sync::RollbackInfo::save ( )

Adds counter to committed statistics and resets the counter.

Here is the call graph for this function:

Member Data Documentation

◆ m_committed

RollbackStats catapult::sync::RollbackInfo::m_committed
private

◆ m_currentRollbackSize

size_t catapult::sync::RollbackInfo::m_currentRollbackSize
private

◆ m_ignored

RollbackStats catapult::sync::RollbackInfo::m_ignored
private

◆ m_recentStatsTimeSpan

const utils::TimeSpan catapult::sync::RollbackInfo::m_recentStatsTimeSpan
private

◆ m_timeSupplier

chain::TimeSupplier catapult::sync::RollbackInfo::m_timeSupplier
private

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