Package io.opencensus.trace
Class Tracestate.Builder
java.lang.Object
io.opencensus.trace.Tracestate.Builder
- Enclosing class:
Tracestate
Builder class for
MessageEvent
.- Since:
- 0.16
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Tracestate
private ArrayList
<Tracestate.Entry> private final Tracestate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a TraceState by adding the entries to the parent in front of the key-value pairs list and removing duplicate entries.Removes theEntry
that has the givenkey
if it is present.Adds or updates theEntry
that has the givenkey
if it is present.
-
Field Details
-
parent
-
entries
-
EMPTY
-
-
Constructor Details
-
Builder
-
-
Method Details
-
set
Adds or updates theEntry
that has the givenkey
if it is present. The newEntry
will always be added in the front of the list of entries.- Parameters:
key
- the key for theEntry
to be added.value
- the value for theEntry
to be added.- Returns:
- this.
- Since:
- 0.16
-
remove
Removes theEntry
that has the givenkey
if it is present.- Parameters:
key
- the key for theEntry
to be removed.- Returns:
- this.
- Since:
- 0.16
-
build
Builds a TraceState by adding the entries to the parent in front of the key-value pairs list and removing duplicate entries.- Returns:
- a TraceState with the new entries.
- Since:
- 0.16
-