Interface Metadata

  • All Known Implementing Classes:

    public interface Metadata
    Bean holding the metadata of one single metric.

    The metadata contains:

    • Name: (Required) The name of the metric.
    • Display name: (Optional) The display (friendly) name of the metric. By default, it is set to the Name.
    • Description: (Optional) A human readable description of the metric.
    • Type: (Required) The type of the metric. See MetricType.
    • Unit: (Optional) The unit of the metric. The unit may be any unit specified as a String or one specified in MetricUnits.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the metric name.
        the metric name.
      • getDisplayName

        java.lang.String getDisplayName()
        Returns the display name if set, otherwise this method returns the metric name.
        the display name
      • displayName

        java.util.Optional<java.lang.String> displayName()
      • getDescription

        java.lang.String getDescription()
        Returns the description of the metric if set, otherwise this method returns the empty String.
        the description
      • description

        java.util.Optional<java.lang.String> description()
      • getType

        java.lang.String getType()
        Returns the String representation of the MetricType.
        the MetricType as a String
        See Also:
      • getUnit

        java.lang.String getUnit()
        Returns the unit of this metric if set, otherwise this method returns MetricUnits.NONE
        the unit
      • unit

        java.util.Optional<java.lang.String> unit()
      • builder

        static MetadataBuilder builder​(Metadata metadata)
        Returns a new builder with the Metadata information
        metadata - the metadata
        a new MetadataBuilder instance with the Metadata values
        java.lang.NullPointerException - when metadata is null