@Immutable public abstract class Tag extends Object
| Modifier and Type | Method and Description |
|---|---|
static Tag |
create(TagKey key,
TagValue value)
Deprecated.
in favor of
create(TagKey, TagValue, TagMetadata). |
static Tag |
create(TagKey key,
TagValue value,
TagMetadata tagMetadata)
Creates a
Tag from the given key, value and metadata. |
abstract TagKey |
getKey()
Returns the tag's key.
|
abstract TagMetadata |
getTagMetadata()
Returns the
TagMetadata associated with this Tag. |
abstract TagValue |
getValue()
Returns the tag's value.
|
@Deprecated public static Tag create(TagKey key, TagValue value)
create(TagKey, TagValue, TagMetadata).Tag from the given key and value.
For backwards-compatibility this method still produces propagating Tags.
This is equivalent to calling create(key, value,
TagMetadata.create(TagTtl.UNLIMITED_PROPAGATION)).
key - the tag key.value - the tag value.Tag with the given key and value.public static Tag create(TagKey key, TagValue value, TagMetadata tagMetadata)
Tag from the given key, value and metadata.key - the tag key.value - the tag value.tagMetadata - the tag metadata.Tag.public abstract TagKey getKey()
public abstract TagValue getValue()
public abstract TagMetadata getTagMetadata()
TagMetadata associated with this Tag.TagMetadata.