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 aBaggagefrom 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, waitMethods inherited from interface io.opentelemetry.api.baggage.BaggageBuilder
put
-
Field Details
-
data
-
-
Constructor Details
-
Builder
Builder() -
Builder
-
-
Method Details
-
put
Description copied from interface:BaggageBuilderAdds the key/value pair and metadata regardless of whether the key is present.- Specified by:
putin interfaceBaggageBuilder- Parameters:
key- theStringkey which will be set.value- theStringvalue to set for the given key.entryMetadata- theBaggageEntryMetadatametadata to set for the given key.- Returns:
- this
-
remove
Description copied from interface:BaggageBuilderRemoves the key if it exists.- Specified by:
removein interfaceBaggageBuilder- Parameters:
key- theStringkey which will be removed.- Returns:
- this
-
build
Description copied from interface:BaggageBuilderCreates aBaggagefrom this builder.- Specified by:
buildin interfaceBaggageBuilder- Returns:
- a
Baggagewith the same entries as this builder.
-