Package io.opencensus.tags
Enum TagMetadata.TagTtl
- java.lang.Object
-
- java.lang.Enum<TagMetadata.TagTtl>
-
- io.opencensus.tags.TagMetadata.TagTtl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TagMetadata.TagTtl>
- Enclosing class:
- TagMetadata
public static enum TagMetadata.TagTtl extends java.lang.Enum<TagMetadata.TagTtl>
TagMetadata.TagTtl
is an integer that represents number of hops a tag can propagate.Anytime a sender serializes a tag, sends it over the wire and receiver deserializes the tag then the tag is considered to have travelled one hop.
There could be one or more proxy(ies) between sender and receiver. Proxies are treated as transparent entities and they are not counted as hops.
For now, only special values of
TagMetadata.TagTtl
are supported.- Since:
- 0.20
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NO_PROPAGATION
ATag
withNO_PROPAGATION
is considered to have local scope and is used within the process where it's created.UNLIMITED_PROPAGATION
ATag
withUNLIMITED_PROPAGATION
can propagate unlimited hops.
-
Field Summary
Fields Modifier and Type Field Description private int
hops
-
Constructor Summary
Constructors Modifier Constructor Description private
TagTtl(int hops)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TagMetadata.TagTtl
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TagMetadata.TagTtl[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_PROPAGATION
public static final TagMetadata.TagTtl NO_PROPAGATION
ATag
withNO_PROPAGATION
is considered to have local scope and is used within the process where it's created.- Since:
- 0.20
-
UNLIMITED_PROPAGATION
public static final TagMetadata.TagTtl UNLIMITED_PROPAGATION
ATag
withUNLIMITED_PROPAGATION
can propagate unlimited hops.However, it is still subject to outgoing and incoming (on remote side) filter criteria.
UNLIMITED_PROPAGATION
is typical used to track a request, which may be processed across multiple entities.- Since:
- 0.20
-
-
Method Detail
-
values
public static TagMetadata.TagTtl[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TagMetadata.TagTtl c : TagMetadata.TagTtl.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TagMetadata.TagTtl valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-