public interface Metadata
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.| Modifier and Type | Method and Description |
|---|---|
static MetadataBuilder |
builder()
Returns a new builder
|
static MetadataBuilder |
builder(Metadata metadata)
Returns a new builder with the
Metadata information |
java.util.Optional<java.lang.String> |
description() |
java.util.Optional<java.lang.String> |
displayName() |
java.lang.String |
getDescription()
Returns the description of the metric if set, otherwise this method returns the empty
String. |
java.lang.String |
getDisplayName()
Returns the display name if set, otherwise this method returns the metric name.
|
java.lang.String |
getName()
Returns the metric name.
|
java.lang.String |
getType()
Returns the String representation of the
MetricType. |
MetricType |
getTypeRaw()
Returns the
MetricType of the metric if set, otherwise it returns MetricType.INVALID |
java.lang.String |
getUnit()
Returns the unit of this metric if set, otherwise this method returns
MetricUnits.NONE |
java.util.Optional<java.lang.String> |
unit() |
java.lang.String getName()
java.lang.String getDisplayName()
java.util.Optional<java.lang.String> displayName()
java.lang.String getDescription()
String.java.util.Optional<java.lang.String> description()
java.lang.String getType()
MetricType.MetricTypeMetricType getTypeRaw()
MetricType of the metric if set, otherwise it returns MetricType.INVALIDMetricTypejava.lang.String getUnit()
MetricUnits.NONEjava.util.Optional<java.lang.String> unit()
static MetadataBuilder builder()
MetadataBuilder instancestatic MetadataBuilder builder(Metadata metadata)
Metadata informationmetadata - the metadataMetadataBuilder instance with the Metadata valuesjava.lang.NullPointerException - when metadata is null