Package io.opentelemetry.api.baggage
Class ImmutableBaggage
java.lang.Object
io.opentelemetry.api.internal.ImmutableKeyValuePairs<String,BaggageEntry>
io.opentelemetry.api.baggage.ImmutableBaggage
- All Implemented Interfaces:
Baggage,ImplicitContextKeyed
@Immutable
final class ImmutableBaggage
extends ImmutableKeyValuePairs<String,BaggageEntry>
implements Baggage
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static BaggageBuilderbuilder()(package private) static Baggageempty()Returns theBaggageEntryassociated with the given key.getEntryValue(String entryKey) Returns theStringvalue associated with the given key, without metadata.private static BaggagesortAndFilterToBaggage(Object[] data) Create a Builder pre-initialized with the contents of this Baggage.Methods inherited from class io.opentelemetry.api.internal.ImmutableKeyValuePairs
asMap, data, equals, forEach, get, getData, hashCode, isEmpty, size, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.opentelemetry.api.baggage.Baggage
asMap, forEach, isEmpty, size, storeInContextMethods inherited from interface io.opentelemetry.context.ImplicitContextKeyed
makeCurrent
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ImmutableBaggage
-
-
Method Details
-
empty
-
builder
-
getEntryValue
Description copied from interface:BaggageReturns theStringvalue associated with the given key, without metadata.- Specified by:
getEntryValuein interfaceBaggage- Parameters:
entryKey- entry key to return the value for.- Returns:
- the value associated with the given key, or
nullif noEntrywith the givenentryKeyis in thisBaggage.
-
getEntry
Description copied from interface:BaggageReturns theBaggageEntryassociated with the given key. -
toBuilder
Description copied from interface:BaggageCreate a Builder pre-initialized with the contents of this Baggage. The returned Builder will be set to not use an implicit parent, so any parent assignment must be done manually. -
sortAndFilterToBaggage
-