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 Tracestateprivate 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 theEntrythat has the givenkeyif it is present.Adds or updates theEntrythat has the givenkeyif it is present.
-
Field Details
-
parent
-
entries
-
EMPTY
-
-
Constructor Details
-
Builder
-
-
Method Details
-
set
Adds or updates theEntrythat has the givenkeyif it is present. The newEntrywill always be added in the front of the list of entries.- Parameters:
key- the key for theEntryto be added.value- the value for theEntryto be added.- Returns:
- this.
- Since:
- 0.16
-
remove
Removes theEntrythat has the givenkeyif it is present.- Parameters:
key- the key for theEntryto 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
-