Interface InternalBridge.Metadata
-
- Enclosing interface:
- InternalBridge
public static interface InternalBridge.MetadataVersion-neutral abstraction of metric metadata.Although this interface supports tags, if you are using MicroProfile Metrics 2.0 or later the system ignores tags associated with metadata.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceInternalBridge.Metadata.MetadataBuilderFluent-style builder for version-neutralInternalBridge.Metadata.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<String>getDescription()StringgetDisplayName()StringgetName()Map<String,String>getTags()Returns the tags associated with the metadata.StringgetType()MetricTypegetTypeRaw()Optional<String>getUnit()booleanisReusable()static InternalBridge.MetadatanewMetadata(String name, String displayName, String description, MetricType type, String unit)Prepares a version-neutralInternalBridge.Metadatainstance using the specified values, avoiding the need to create and act on a builder.static InternalBridge.MetadatanewMetadata(String name, String displayName, String description, MetricType type, String unit, boolean isReusable, Map<String,String> tags)Prepares a version-neutralInternalBridge.Metadatainstance using the specified values, avoiding the need to create and act on a builder.static InternalBridge.MetadatanewMetadata(String name, String displayName, String description, MetricType type, String unit, Map<String,String> tags)Prepares a version-neutralInternalBridge.Metadatainstance using the specified values, avoiding the need to create and act on a builder.
-
-
-
Method Detail
-
getName
String getName()
- Returns:
- the metric name stored in the metadata
-
getDisplayName
String getDisplayName()
- Returns:
- the display name
-
getType
String getType()
- Returns:
- the metric type as a
String
-
getTypeRaw
MetricType getTypeRaw()
- Returns:
- the metric type as a MicroProfile Metrics {link MetricType}
-
isReusable
boolean isReusable()
- Returns:
- whether metrics described by this metadata are reusable or not
-
getTags
Map<String,String> getTags()
Returns the tags associated with the metadata.Note that if you are using MicroProfile Metrics 2.0 and later the tags associated with this version-neutral metadata are ignored.
- Returns:
- tags
-
newMetadata
static InternalBridge.Metadata newMetadata(String name, String displayName, String description, MetricType type, String unit, boolean isReusable, Map<String,String> tags)
Prepares a version-neutralInternalBridge.Metadatainstance using the specified values, avoiding the need to create and act on a builder.Note that although this method accepts tags, if you are using MicroProfile Metrics 2.0 or later the returned metadata will not include the tags.
- Parameters:
name- name for the metrics associated with the metadatadisplayName- display namedescription- description of the metrictype-MetricTypeof the metricunit- unit that applies to the metricisReusable- whether or not metrics based on this metadata should be reusabletags- name/value pairs representing tags- Returns:
- the prepared version-neutral
Metadata
-
newMetadata
static InternalBridge.Metadata newMetadata(String name, String displayName, String description, MetricType type, String unit, Map<String,String> tags)
Prepares a version-neutralInternalBridge.Metadatainstance using the specified values, avoiding the need to create and act on a builder.Note that although this method accepts tags, if you are using MicroProfile Metrics 2.0 or later the returned metadata will not include the tags.
Also note that whether the metadata is reusable relies on the underlying MicroProfile Metrics version you are using.
- Parameters:
name- name for the metrics associated with the metadatadisplayName- display namedescription- description of the metrictype-MetricTypeof the metricunit- unit that applies to the metrictags- name/value pairs representing tags- Returns:
- the prepared version-neutral
Metadata
-
newMetadata
static InternalBridge.Metadata newMetadata(String name, String displayName, String description, MetricType type, String unit)
Prepares a version-neutralInternalBridge.Metadatainstance using the specified values, avoiding the need to create and act on a builder.Note that whether the metadata is reusable relies on the underlying MicroProfile Metrics version you are using.
- Parameters:
name- name for the metrics associated with the metadatadisplayName- display namedescription- description of the metrictype-MetricTypeof the metricunit- unit that applies to the metric- Returns:
- the prepared version-neutral
Metadata
-
-