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 |
Optional<String> |
description() |
Optional<String> |
displayName() |
String |
getDescription()
Returns the description of the metric if set, otherwise this method returns the empty
String. |
String |
getDisplayName()
Returns the display name if set, otherwise this method returns the metric name.
|
String |
getName()
Returns the metric name.
|
String |
getType()
Returns the String representation of the
MetricType. |
MetricType |
getTypeRaw()
Returns the
MetricType of the metric if set, otherwise it returns MetricType.INVALID |
String |
getUnit()
Returns the unit of this metric if set, otherwise this method returns
MetricUnits.NONE |
Optional<String> |
unit() |
String getName()
String getDisplayName()
String getDescription()
String.String getType()
MetricType.MetricTypeMetricType getTypeRaw()
MetricType of the metric if set, otherwise it returns MetricType.INVALIDMetricTypeString getUnit()
MetricUnits.NONEstatic MetadataBuilder builder()
MetadataBuilder instancestatic MetadataBuilder builder(Metadata metadata)
Metadata informationmetadata - the metadataMetadataBuilder instance with the Metadata valuesNullPointerException - when metadata is nullCopyright © 2017 – 2020 Eclipse Foundation. All rights reserved.
Use is subject to license terms.