Interface Metadata

All Known Implementing Classes:
DefaultMetadata

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 Details

    • getName

      String getName()
      Returns the metric name.
      Returns:
      the metric name.
    • getDisplayName

      String getDisplayName()
      Returns the display name if set, otherwise this method returns the metric name.
      Returns:
      the display name
    • getDescription

      Optional<String> getDescription()
      Returns the description of the metric.
      Returns:
      the description
    • getType

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

      MetricType getTypeRaw()
      Returns the MetricType of the metric
      Returns:
      the MetricType
    • getUnit

      Optional<String> getUnit()
    • isReusable

      boolean isReusable()
    • builder

      static MetadataBuilder builder()
      Returns a new builder
      Returns:
      a new MetadataBuilder instance
    • builder

      static MetadataBuilder builder(Metadata metadata)
      Returns a new builder with the Metadata information
      Parameters:
      metadata - the metadata
      Returns:
      a new MetadataBuilder instance with the Metadata values
      Throws:
      NullPointerException - when metadata is null