public class NumberGauge extends AbstractMonitor<java.lang.Number> implements Gauge<java.lang.Number>
Gauge
that returns the value stored in Number
.config
Constructor and Description |
---|
NumberGauge(MonitorConfig config,
java.lang.Number number)
Construct a gauge that will store weak reference to the number.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Number |
getValue(int pollerIdx)
Returns the current value for the monitor for the nth poller.
|
int |
hashCode() |
java.lang.String |
toString() |
getConfig, getValue
public NumberGauge(MonitorConfig config, java.lang.Number number)
number
or Double.NaN
in case
the referred Number has been garbage collected.public java.lang.Number getValue(int pollerIdx)
public boolean equals(java.lang.Object o)
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