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 BaggageBuilder
builder()
(package private) static Baggage
empty()
Returns theBaggageEntry
associated with the given key.getEntryValue
(String entryKey) Returns theString
value associated with the given key, without metadata.private static Baggage
sortAndFilterToBaggage
(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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.opentelemetry.api.baggage.Baggage
asMap, forEach, isEmpty, size, storeInContext
Methods inherited from interface io.opentelemetry.context.ImplicitContextKeyed
makeCurrent
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ImmutableBaggage
-
-
Method Details
-
empty
-
builder
-
getEntryValue
Description copied from interface:Baggage
Returns theString
value associated with the given key, without metadata.- Specified by:
getEntryValue
in interfaceBaggage
- Parameters:
entryKey
- entry key to return the value for.- Returns:
- the value associated with the given key, or
null
if noEntry
with the givenentryKey
is in thisBaggage
.
-
getEntry
Description copied from interface:Baggage
Returns theBaggageEntry
associated with the given key. -
toBuilder
Description copied from interface:Baggage
Create 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
-