public final class Metric extends java.lang.Object implements MetricNumericConverter, scala.Product, scala.Serializable
Equality of Metric is based on its name.
param: name the metric name param: value the metric value, which must be a valid numerical value, a valid value is neither negative nor NaN/Infinite. param: average the data stream of the metric value, for trending over time. Metrics that are already averages (e.g. system load average) or finite (e.g. as number of processors), are not trended.
Constructor and Description |
---|
Metric(java.lang.String name,
java.lang.Number value,
scala.Option<EWMA> average)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
scala.Option<EWMA> |
average()
Deprecated.
|
abstract static boolean |
canEqual(java.lang.Object that)
Deprecated.
|
static scala.util.Either<java.lang.Object,java.lang.Object> |
convertNumber(java.lang.Object from)
Deprecated.
|
static scala.Option<Metric> |
create(java.lang.String name,
java.lang.Number value,
scala.Option<java.lang.Object> decayFactor)
Deprecated.
Creates a new Metric instance if the value is valid, otherwise None
is returned.
|
static scala.Option<Metric> |
create(java.lang.String name,
scala.util.Try<java.lang.Number> value,
scala.Option<java.lang.Object> decayFactor)
Deprecated.
Creates a new Metric instance if the Try is successful and the value is valid,
otherwise None is returned.
|
static boolean |
defined(java.lang.Number value)
Deprecated.
|
boolean |
equals(java.lang.Object obj)
Deprecated.
|
int |
hashCode()
Deprecated.
|
boolean |
isSmooth()
Deprecated.
|
java.lang.String |
name()
Deprecated.
|
abstract static int |
productArity()
Deprecated.
|
abstract static java.lang.Object |
productElement(int n)
Deprecated.
|
static scala.collection.Iterator<java.lang.Object> |
productIterator()
Deprecated.
|
static java.lang.String |
productPrefix()
Deprecated.
|
boolean |
sameAs(Metric that)
Deprecated.
Returns true if
that is tracking the same metric as this. |
double |
smoothValue()
Deprecated.
The numerical value of the average, if defined, otherwise the latest value
|
java.lang.Number |
value()
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
convertNumber, defined
public Metric(java.lang.String name, java.lang.Number value, scala.Option<EWMA> average)
public static scala.Option<Metric> create(java.lang.String name, java.lang.Number value, scala.Option<java.lang.Object> decayFactor)
name
- (undocumented)value
- (undocumented)decayFactor
- (undocumented)public static scala.Option<Metric> create(java.lang.String name, scala.util.Try<java.lang.Number> value, scala.Option<java.lang.Object> decayFactor)
name
- (undocumented)value
- (undocumented)decayFactor
- (undocumented)public static boolean defined(java.lang.Number value)
public static scala.util.Either<java.lang.Object,java.lang.Object> convertNumber(java.lang.Object from)
public abstract static boolean canEqual(java.lang.Object that)
public abstract static java.lang.Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<java.lang.Object> productIterator()
public static java.lang.String productPrefix()
public java.lang.String name()
public java.lang.Number value()
public scala.Option<EWMA> average()
public double smoothValue()
public boolean isSmooth()
public boolean sameAs(Metric that)
that
is tracking the same metric as this.that
- (undocumented)public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface scala.Equals
equals
in class java.lang.Object