Interface InternalBridge.MetricID

  • All Superinterfaces:
    Comparable<InternalBridge.MetricID>
    Enclosing interface:
    InternalBridge

    public static interface InternalBridge.MetricID
    extends Comparable<InternalBridge.MetricID>
    Version-neutral abstraction of a metric identifier.

    Note that for a metric with tags, the tags are ALWAYS present in the neutral MetricID. We want to encourage the internal clients to use the newer programming style, retrieving tags from the ID rather than the metadata (where it was stored in MP Metrics 1.1).

    • Method Detail

      • getName

        String getName()
        Returns:
        the name from the identifier
      • getTags

        Map<String,​String> getTags()
        Returns:
        the tags from the identifier, as a Map
      • getTagsAsList

        default List<InternalBridge.Tag> getTagsAsList()
        Provides the tags as a List. The returned Tag objects are separate from those associated with the ID so changes to the tags made by the caller do not perturb the original ID.
        Returns:
        the Tags
      • getTagsAsString

        default String getTagsAsString()
        Describes the tags as a single string: name1=value1,name2=value2,...
        Returns:
        String containing the tags
      • compareTo

        default int compareTo​(InternalBridge.MetricID o)
        Compares this instance to another object (per Comparable.
        Specified by:
        compareTo in interface Comparable<InternalBridge.MetricID>
        Parameters:
        o - the other object to compare to
        Returns:
        -1, 0, +1 depending on whether this instance is less than, equal to, or greater than the other object.