Package org.eclipse.microprofile.metrics
Class DefaultMetadata
java.lang.Object
org.eclipse.microprofile.metrics.DefaultMetadata
- All Implemented Interfaces:
Metadata
The default implementation of
Metadata
-
Constructor Summary
ModifierConstructorDescriptionprotected
DefaultMetadata
(String name, String displayName, String description, MetricType type, String unit, boolean reusable) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the description of the metric.Returns the display name if set, otherwise this method returns the metric name.getName()
Returns the metric name.getType()
Returns the String representation of theMetricType
.Returns theMetricType
of the metricgetUnit()
int
hashCode()
boolean
toString()
-
Constructor Details
-
DefaultMetadata
protected DefaultMetadata(String name, String displayName, String description, MetricType type, String unit, boolean reusable)
-
-
Method Details
-
getName
Description copied from interface:Metadata
Returns the metric name. -
getDisplayName
Description copied from interface:Metadata
Returns the display name if set, otherwise this method returns the metric name.- Specified by:
getDisplayName
in interfaceMetadata
- Returns:
- the display name
-
getDescription
Description copied from interface:Metadata
Returns the description of the metric.- Specified by:
getDescription
in interfaceMetadata
- Returns:
- the description
-
getType
Description copied from interface:Metadata
Returns the String representation of theMetricType
. -
getTypeRaw
Description copied from interface:Metadata
Returns theMetricType
of the metric- Specified by:
getTypeRaw
in interfaceMetadata
- Returns:
- the
MetricType
-
getUnit
-
isReusable
public boolean isReusable()- Specified by:
isReusable
in interfaceMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-