Package io.opentelemetry.api.baggage
Class ImmutableBaggage
- java.lang.Object
-
- io.opentelemetry.api.internal.ImmutableKeyValuePairs<java.lang.String,BaggageEntry>
-
- io.opentelemetry.api.baggage.ImmutableBaggage
-
- All Implemented Interfaces:
Baggage,ImplicitContextKeyed
@Immutable final class ImmutableBaggage extends ImmutableKeyValuePairs<java.lang.String,BaggageEntry> implements Baggage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classImmutableBaggage.Builder
-
Constructor Summary
Constructors Modifier Constructor Description privateImmutableBaggage(java.lang.Object[] data)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static BaggageBuilderbuilder()Creates a newBaggageBuilderfor creating Baggage.(package private) static Baggageempty()Baggage with no entries.BaggageEntrygetEntry(java.lang.String entryKey)Returns theBaggageEntryassociated with the given key.java.lang.StringgetEntryValue(java.lang.String entryKey)Returns theStringvalue associated with the given key, without metadata.private static BaggagesortAndFilterToBaggage(java.lang.Object[] data)BaggageBuildertoBuilder()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 Detail
-
EMPTY
private static final Baggage EMPTY
-
-
Method Detail
-
builder
static BaggageBuilder builder()
Description copied from interface:BaggageCreates a newBaggageBuilderfor creating Baggage.
-
getEntryValue
@Nullable public java.lang.String getEntryValue(java.lang.String entryKey)
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
@Nullable public BaggageEntry getEntry(java.lang.String entryKey)
Description copied from interface:BaggageReturns theBaggageEntryassociated with the given key.
-
toBuilder
public BaggageBuilder 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
private static Baggage sortAndFilterToBaggage(java.lang.Object[] data)
-
-