Package com.codahale.metrics
Class CachedGauge<T>
- java.lang.Object
-
- com.codahale.metrics.CachedGauge<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCachedGauge(long timeout, TimeUnit timeoutUnit)Creates a new cached gauge with the given timeout period.protectedCachedGauge(Clock clock, long timeout, TimeUnit timeoutUnit)Creates a new cached gauge with the given clock and timeout period.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TgetValue()Returns the metric's current value.protected abstract TloadValue()Loads the value and returns it.
-
-
-
Constructor Detail
-
CachedGauge
protected CachedGauge(long timeout, TimeUnit timeoutUnit)Creates a new cached gauge with the given timeout period.- Parameters:
timeout- the timeouttimeoutUnit- the unit oftimeout
-
-