Package io.helidon.common.metrics
Interface InternalBridge.Metadata.MetadataBuilder
-
- Enclosing interface:
- InternalBridge.Metadata
public static interface InternalBridge.Metadata.MetadataBuilderFluent-style builder for version-neutralInternalBridge.Metadata.The name is from MP Metrics but is actually the factory for
Metadatain the design of the bridge.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceInternalBridge.Metadata.MetadataBuilder.FactoryFactory forMetadataBuilderinstances.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InternalBridge.Metadatabuild()Creates aInternalBridge.Metadatainstance using the values set by invocations of the variouswithXXXmethods.InternalBridge.Metadata.MetadataBuildernotReusable()Sets that the resulting metadata will not be reusable.InternalBridge.Metadata.MetadataBuilderreusable()Sets that the resulting metadata will be reusable.InternalBridge.Metadata.MetadataBuilderwithDescription(String description)Sets the description.InternalBridge.Metadata.MetadataBuilderwithDisplayName(String displayName)Sets the display name.InternalBridge.Metadata.MetadataBuilderwithName(String name)Sets the name.InternalBridge.Metadata.MetadataBuilderwithTags(Map<String,String> tags)Sets the tags.InternalBridge.Metadata.MetadataBuilderwithType(MetricType type)Sets the metric type.InternalBridge.Metadata.MetadataBuilderwithUnit(String unit)Sets the unit.
-
-
-
Method Detail
-
withName
InternalBridge.Metadata.MetadataBuilder withName(String name)
Sets the name.- Parameters:
name- name to be used in the metadata; cannot be null- Returns:
- the same builder
-
withDisplayName
InternalBridge.Metadata.MetadataBuilder withDisplayName(String displayName)
Sets the display name.- Parameters:
displayName- display name to be used in the metadata; cannot be null- Returns:
- the same builder
-
withDescription
InternalBridge.Metadata.MetadataBuilder withDescription(String description)
Sets the description.- Parameters:
description- description to be used in the metadata; cannot be null- Returns:
- the same builder
-
withType
InternalBridge.Metadata.MetadataBuilder withType(MetricType type)
Sets the metric type.- Parameters:
type-MetricTypeto be used in the metadata; cannot be null- Returns:
- the same builder
-
withUnit
InternalBridge.Metadata.MetadataBuilder withUnit(String unit)
Sets the unit.- Parameters:
unit- unit to be used in the metadata; cannot be null- Returns:
- the same builder
-
reusable
InternalBridge.Metadata.MetadataBuilder reusable()
Sets that the resulting metadata will be reusable.- Returns:
- the same builder
-
notReusable
InternalBridge.Metadata.MetadataBuilder notReusable()
Sets that the resulting metadata will not be reusable.- Returns:
- the same builder
-
withTags
InternalBridge.Metadata.MetadataBuilder withTags(Map<String,String> tags)
Sets the tags.Note that when you use MicroProfile Metrics 2.0 or later, tags associated with metadata are ignored except within the metadata itself.
- Parameters:
tags- map conveying the tags to be used in the metadata;- Returns:
- the same builder
-
build
InternalBridge.Metadata build()
Creates aInternalBridge.Metadatainstance using the values set by invocations of the variouswithXXXmethods.- Returns:
- the version-neutral
Metadata - Throws:
IllegalStateException- if the name was never set
-
-