Package io.opentelemetry.api.baggage
Class ImmutableBaggage.Builder
java.lang.Object
io.opentelemetry.api.baggage.ImmutableBaggage.Builder
- All Implemented Interfaces:
BaggageBuilder
- Enclosing class:
ImmutableBaggage
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates aBaggage
from this builder.put
(String key, String value, BaggageEntryMetadata entryMetadata) Adds the key/value pair and metadata regardless of whether the key is present.Removes the key if it exists.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.opentelemetry.api.baggage.BaggageBuilder
put
-
Field Details
-
data
-
-
Constructor Details
-
Builder
Builder() -
Builder
-
-
Method Details
-
put
Description copied from interface:BaggageBuilder
Adds the key/value pair and metadata regardless of whether the key is present.- Specified by:
put
in interfaceBaggageBuilder
- Parameters:
key
- theString
key which will be set.value
- theString
value to set for the given key.entryMetadata
- theBaggageEntryMetadata
metadata to set for the given key.- Returns:
- this
-
remove
Description copied from interface:BaggageBuilder
Removes the key if it exists.- Specified by:
remove
in interfaceBaggageBuilder
- Parameters:
key
- theString
key which will be removed.- Returns:
- this
-
build
Description copied from interface:BaggageBuilder
Creates aBaggage
from this builder.- Specified by:
build
in interfaceBaggageBuilder
- Returns:
- a
Baggage
with the same entries as this builder.
-