Class UnspecifiedMetadata

  • All Implemented Interfaces:
    org.eclipse.microprofile.metrics.Metadata

    public class UnspecifiedMetadata
    extends Object
    implements org.eclipse.microprofile.metrics.Metadata
    This is a special class to internally mark that no metadata was specified for a metric registration. We can't simply use null instead of this because we still need to keep track of the metric name and type somewhere. Instances of this class MUST NOT be actually stored in the MetricsRegistry, it needs to be converted to real metadata first!!!
    • Constructor Detail

      • UnspecifiedMetadata

        public UnspecifiedMetadata​(String name)
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface org.eclipse.microprofile.metrics.Metadata
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface org.eclipse.microprofile.metrics.Metadata
      • description

        public Optional<String> description()
        Specified by:
        description in interface org.eclipse.microprofile.metrics.Metadata
      • getUnit

        public String getUnit()
        Specified by:
        getUnit in interface org.eclipse.microprofile.metrics.Metadata
      • unit

        public Optional<String> unit()
        Specified by:
        unit in interface org.eclipse.microprofile.metrics.Metadata
      • convertToRealMetadata

        public org.eclipse.microprofile.metrics.Metadata convertToRealMetadata()