CatapultServer
v0.5.0.1 (Elephant)
|
Container for both committed and ignored rollback statistics. More...
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 |
Container for both committed and ignored rollback statistics.
|
explicit |
Creates a container around timeSupplier with recent stats span (recentStatsTimeSpan).
size_t catapult::sync::RollbackInfo::counter | ( | RollbackResult | rollbackResult, |
RollbackCounterType | rollbackCounterType | ||
) | const |
Returns rollback counter for result (rollbackResult) and counter type (rollbackCounterType).
void catapult::sync::RollbackInfo::increment | ( | ) |
Increments counter.
|
private |
void catapult::sync::RollbackInfo::reset | ( | ) |
Adds counter to ignored statistics and resets the counter.
void catapult::sync::RollbackInfo::save | ( | ) |
Adds counter to committed statistics and resets the counter.
|
private |
|
private |
|
private |
|
private |
|
private |