public final class LongAvgRateMapStat extends MapStat<Long,LongAvgRate>
LongAvgRate values
which can be looked up with a String key, and that returns results as a
formatted string.| Modifier and Type | Field and Description |
|---|---|
protected long |
periodMillis
The averaging period in milliseconds.
|
definition| Constructor and Description |
|---|
LongAvgRateMapStat(StatGroup group,
StatDefinition definition,
long periodMillis,
TimeUnit reportTimeUnit)
Creates an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
LongAvgRateMapStat |
computeInterval(Stat<String> base)
Creates a new map that contains entries for all keys that appear in
whichever of this map or the argument is newer, with those entries
updated with any values from both maps.
|
LongAvgRateMapStat |
copy()
Returns a copy of this statistic.
|
LongAvgRate |
createStat(String key)
Creates, stores, and returns a new stat for the specified key.
|
void |
negate()
Do nothing for this non-additive stat.
|
void |
removeStat(String key)
Note the removal time, so that computeInterval can tell if an empty map
is newer than a non-empty one.
|
add, clear, copyAndClear, get, getFormattedValue, getMap, isNotSet, setcopyAndAdd, getDefinition, toString, toStringVerbosepublic LongAvgRateMapStat(StatGroup group, StatDefinition definition, long periodMillis, TimeUnit reportTimeUnit)
group - the owning groupdefinition - the associated definitionperiodMillis - the sampling period in millisecondsreportTimeUnit - the time unit for reporting ratespublic LongAvgRate createStat(String key)
key - the keypublic void removeStat(String key)
removeStat in class MapStat<Long,LongAvgRate>key - the keypublic LongAvgRateMapStat copy()
BaseStatpublic LongAvgRateMapStat computeInterval(Stat<String> base)
computeInterval in class Stat<String>Copyright © 2024. All rights reserved.