Class MetricName

  • All Implemented Interfaces:
    java.io.Serializable

    @Experimental(METRICS)
    public abstract class MetricName
    extends java.lang.Object
    implements java.io.Serializable
    The name of a metric consists of a getNamespace() and a getName(). The getNamespace() allows grouping related metrics together and also prevents collisions between multiple metrics with the same name.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MetricName()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MetricName

        public MetricName()
    • Method Detail

      • getNamespace

        public abstract java.lang.String getNamespace()
        The namespace associated with this metric.
      • getName

        public abstract java.lang.String getName()
        The name of this metric.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • named

        public static MetricName named​(java.lang.String namespace,
                                       java.lang.String name)
      • named

        public static MetricName named​(java.lang.Class<?> namespace,
                                       java.lang.String name)