Constructor and Description |
---|
Id(String name,
Iterable<Tag> tags,
String baseUnit,
String description,
String hierarchicalName,
Meter.Type type) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getBaseUnit() |
String |
getConventionName(NamingConvention namingConvention) |
List<Tag> |
getConventionTags(NamingConvention namingConvention)
Tags that are sorted by key and formatted
|
String |
getDescription() |
String |
getHierarchicalName() |
String |
getName() |
String |
getTag(String key) |
Iterable<Tag> |
getTags() |
Meter.Type |
getType()
The type is used by different registry implementations to structure the exposition
of metrics to different backends.
|
int |
hashCode() |
String |
toString() |
Meter.Id |
withBaseUnit(String newBaseUnit)
Generate a new id with a different base unit.
|
Meter.Id |
withTag(Statistic statistic)
Generate a new id with an additional tag with a tag key of "statistic".
|
Meter.Id |
withTag(Tag tag)
Generate a new id with an additional tag.
|
Meter.Id |
withTags(Iterable<Tag> tags)
Generate a new id with a different set of tags.
|
public Meter.Id withTag(Tag tag)
tag
- The tag to add.public Meter.Id withTag(Statistic statistic)
statistic
- The statistic tag to add.public Meter.Id withBaseUnit(@Nullable String newBaseUnit)
newBaseUnit
- The base unit of the new id.public Meter.Id withTags(Iterable<Tag> tags)
tags
- The tags of the new idpublic String getName()
public String getHierarchicalName()
public Iterable<Tag> getTags()
@Nullable public String getTag(String key)
key
- The tag key to attempt to match.null
if no tag with the provided key exists on this id.@Nullable public String getBaseUnit()
public String getConventionName(NamingConvention namingConvention)
namingConvention
- The naming convention used to normalize the id's name.public List<Tag> getConventionTags(NamingConvention namingConvention)
namingConvention
- The naming convention used to normalize the id's name.@Nullable public String getDescription()
public Meter.Type getType()
Copyright 2010-2022 ForgeRock AS.