Constructor and Description |
---|
DefaultId(String name)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
name()
Description of the measurement that is being collected.
|
DefaultId |
normalize()
Returns a new id with the tag list sorted by key and with no duplicate keys.
|
DefaultId |
rollup(Set<String> keys,
boolean keep)
Create a new id by removing tags from the list.
|
Iterable<Tag> |
tags()
Other dimensions that can be used to classify the measurement.
|
String |
toString() |
DefaultId |
withTag(String key,
String value)
New id with an additional tag value.
|
DefaultId |
withTag(Tag tag)
New id with an additional tag value.
|
DefaultId |
withTags(Iterable<Tag> ts)
New id with additional tag values.
|
public DefaultId(String name)
public String name()
Id
public Iterable<Tag> tags()
Id
public DefaultId withTag(Tag tag)
Id
public DefaultId withTag(String key, String value)
Id
public DefaultId withTags(Iterable<Tag> ts)
Id
public DefaultId normalize()
public DefaultId rollup(Set<String> keys, boolean keep)
keys
- Set of keys to either keep or remove.keep
- If true, then the new id can only have tag keys in the provided set. Otherwise the new id
can only have ids not in that set.