Package io.airlift.stats
Class CounterStat
java.lang.Object
io.airlift.stats.CounterStat
Event statistics.
Thread-safety: instances of CounterStat are thread-safe. However,
there is no consistency guarantee when using reset() or resetTo(io.airlift.stats.CounterStat) concurrently
with update(long) or merge(io.airlift.stats.CounterStat).
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongvoidmerge(CounterStat counterStat) voidreset()Resets counters.voidresetTo(CounterStat counterStat) Deprecated.snapshot()voidupdate(long count)
-
Constructor Details
-
CounterStat
public CounterStat()
-
-
Method Details
-
update
public void update(long count) -
merge
-
reset
public void reset()Resets counters.Note: this method is guaranteed to obliterate effect of previous
update(long)ormerge(io.airlift.stats.CounterStat)invocations. When it invoked concurrently withupdate(long)ormerge(io.airlift.stats.CounterStat), the result is indeterminate. -
resetTo
Deprecated.This is a hack to work around limitations in Jmxutils. -
getTotalCount
public long getTotalCount() -
getOneMinute
-
getFiveMinute
-
getFifteenMinute
-
snapshot
-