Class CachedGauge<T>
java.lang.Object
com.codahale.metrics.CachedGauge<T>
- Type Parameters:
T- the type of the gauge's value
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCachedGauge(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
-
Field Details
-
clock
-
reloadAt
-
timeoutNS
private final long timeoutNS -
value
-
-
Constructor Details
-
CachedGauge
Creates a new cached gauge with the given timeout period.- Parameters:
timeout- the timeouttimeoutUnit- the unit oftimeout
-
CachedGauge
-
-
Method Details
-
loadValue
-
getValue
-
shouldLoad
private boolean shouldLoad()
-