public final class BasicGauge<T extends java.lang.Number> extends AbstractMonitor<T> implements Gauge<T>
config
Constructor and Description |
---|
BasicGauge(MonitorConfig config,
java.util.concurrent.Callable<T> function)
Creates a new instance of the gauge.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
T |
getValue(int pollerIndex)
Returns the current value for the monitor for the nth poller.
|
int |
hashCode() |
java.lang.String |
toString() |
getConfig, getValue
public BasicGauge(MonitorConfig config, java.util.concurrent.Callable<T> function)
config
- configuration for this monitorfunction
- a function used to fetch the value on demandpublic T getValue(int pollerIndex)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object