Package io.smallrye.metrics
Class UnspecifiedMetadata
- java.lang.Object
-
- io.smallrye.metrics.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 Summary
Constructors Constructor Description UnspecifiedMetadata(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.microprofile.metrics.MetadataconvertToRealMetadata()Optional<String>description()StringgetDescription()StringgetName()StringgetUnit()Optional<String>unit()
-
-
-
Constructor Detail
-
UnspecifiedMetadata
public UnspecifiedMetadata(String name)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.eclipse.microprofile.metrics.Metadata
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceorg.eclipse.microprofile.metrics.Metadata
-
description
public Optional<String> description()
- Specified by:
descriptionin interfaceorg.eclipse.microprofile.metrics.Metadata
-
getUnit
public String getUnit()
- Specified by:
getUnitin interfaceorg.eclipse.microprofile.metrics.Metadata
-
unit
public Optional<String> unit()
- Specified by:
unitin interfaceorg.eclipse.microprofile.metrics.Metadata
-
convertToRealMetadata
public org.eclipse.microprofile.metrics.Metadata convertToRealMetadata()
-
-