Top Description Methods
org.eclipse.microprofile.metrics

public Interface Metadata

Known Direct Implementers
org.eclipse.microprofile.metrics.DefaultMetadata
Imports
java.util.Objects, .Optional

Bean holding the metadata of one single metric.

The metadata contains:

Author
hrupp, Raymond Lam, Jan Bernitt

Method Summary

Modifier and TypeMethod and Description
public static MetadataBuilder

Returns:

a new MetadataBuilder instance
builder
()

Returns a new builder

public static MetadataBuilder

Returns:

a new MetadataBuilder instance with the Metadata values
builder
(Metadata
the metadata
metadata
)

Returns a new builder with the Metadata information

public Optional<String>
public String

Returns:

the description
getDescription
()

Returns the description of the metric if set, otherwise this method returns the empty String.

public String

Returns:

the metric name.
getName
()

Returns the metric name.

public String

Returns:

the unit
getUnit
()

Returns the unit of this metric if set, otherwise this method returns MetricUnits#NONE

public Optional<String>
unit()

Method Detail

builderback to summary
public static MetadataBuilder builder()

Returns a new builder

Returns:MetadataBuilder

a new MetadataBuilder instance

builderback to summary
public static MetadataBuilder builder(Metadata metadata)

Returns a new builder with the Metadata information

Parameters
metadata:Metadata

the metadata

Returns:MetadataBuilder

a new MetadataBuilder instance with the Metadata values

Exceptions
NullPointerException:
when metadata is null
descriptionback to summary
public Optional<String> description()
getDescriptionback to summary
public String getDescription()

Returns the description of the metric if set, otherwise this method returns the empty String.

Returns:String

the description

getNameback to summary
public String getName()

Returns the metric name.

Returns:String

the metric name.

getUnitback to summary
public String getUnit()

Returns the unit of this metric if set, otherwise this method returns MetricUnits#NONE

Returns:String

the unit

unitback to summary
public Optional<String> unit()