public interface Metadata
The metadata contains:
Name: (Required) The name of the metric.Description: (Optional) A human readable description of the metric.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.lang.String |
getDescription()
Returns the description of the metric if set, otherwise this method returns the empty
String. |
java.lang.String |
getName()
Returns the metric name.
|
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 getDescription()
String.java.util.Optional<java.lang.String> description()
java.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