Modifier | Constructor and Description |
---|---|
protected |
CachedGauge(Clock clock,
long timeout,
TimeUnit timeoutUnit)
Creates a new cached gauge with the given clock and timeout period.
|
protected |
CachedGauge(long timeout,
TimeUnit timeoutUnit)
Creates a new cached gauge with the given timeout period.
|
Modifier and Type | Method and Description |
---|---|
T |
getValue()
Returns the metric's current value.
|
protected abstract T |
loadValue()
Loads the value and returns it.
|
protected CachedGauge(long timeout, TimeUnit timeoutUnit)
timeout
- the timeouttimeoutUnit
- the unit of timeout
Copyright © 2014. All Rights Reserved.