public abstract class MetricName
extends java.lang.Object
implements java.io.Serializable
getNamespace()
and a getName()
. The getNamespace()
allows grouping related metrics together and also prevents collisions between
multiple metrics with the same name.Constructor and Description |
---|
MetricName() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
getName()
The name of this metric.
|
abstract java.lang.String |
getNamespace()
The namespace associated with this metric.
|
static MetricName |
named(java.lang.Class<?> namespace,
java.lang.String name) |
static MetricName |
named(java.lang.String namespace,
java.lang.String name) |
java.lang.String |
toString() |
public abstract java.lang.String getNamespace()
public abstract java.lang.String getName()
@Memoized public java.lang.String toString()
toString
in class java.lang.Object
public static MetricName named(java.lang.String namespace, java.lang.String name)
public static MetricName named(java.lang.Class<?> namespace, java.lang.String name)