Package io.dropwizard.metrics5
Class CachedGauge<T>
java.lang.Object
io.dropwizard.metrics5.CachedGauge<T>
- Type Parameters:
T
- the type of the gauge's value
A
Gauge
implementation which caches its value for a period of time.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CachedGauge
(long timeout, TimeUnit timeoutUnit) Creates a new cached gauge with the given timeout period.protected
CachedGauge
(Clock clock, long timeout, TimeUnit timeoutUnit) Creates a new cached gauge with the given clock and timeout period. -
Method Summary
-
Constructor Details
-
CachedGauge
Creates a new cached gauge with the given timeout period.- Parameters:
timeout
- the timeouttimeoutUnit
- the unit oftimeout
-
CachedGauge
Creates a new cached gauge with the given clock and timeout period.- Parameters:
clock
- the clock used to calculate the timeouttimeout
- the timeouttimeoutUnit
- the unit oftimeout
-
-
Method Details