Top Inners Fields Constructors Methods
io.opentelemetry.api.baggage

pack-priv final Class ImmutableBaggage

extends ImmutableKeyValuePairs<String, BaggageEntry>
implements Baggage
Class Inheritance
All Implemented Interfaces
io.opentelemetry.api.baggage.Baggage, io.opentelemetry.context.ImplicitContextKeyed
Annotations
@Immutable
Imports
io.opentelemetry.api.internal.ImmutableKeyValuePairs, java.util.ArrayList, .Comparator, .List, javax.annotation.Nullable, javax.annotation.concurrent.Immutable

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final Baggage

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static BaggageBuilder
builder()

Hides io.opentelemetry.api.baggage.Baggage.builder.

Creates a new BaggageBuilder for creating Baggage.

pack-priv static Baggage
empty()

Hides io.opentelemetry.api.baggage.Baggage.empty.

Baggage with no entries.

public BaggageEntry
getEntry(String
entry key to return the BaggageEntry for, or null if no Entry with the given entryKey is in this Baggage.
entryKey
)

Overrides default io.opentelemetry.api.baggage.Baggage.getEntry.

Returns the BaggageEntry associated with the given key.

public String
getEntryValue(String
entry key to return the value for.
entryKey
)

Implements io.opentelemetry.api.baggage.Baggage.getEntryValue.

Returns the String value associated with the given key, without metadata.

private static Baggage
public BaggageBuilder
toBuilder()

Implements io.opentelemetry.api.baggage.Baggage.toBuilder.

Create a Builder pre-initialized with the contents of this Baggage.

Inherited from io.opentelemetry.api.internal.ImmutableKeyValuePairs:
asMapdataequalsforEachgetgetDatahashCodeisEmptysizetoString

Field Detail

EMPTYback to summary
private static final Baggage EMPTY

Constructor Detail

ImmutableBaggageback to summary
private ImmutableBaggage(Object[] data)

Method Detail

builderback to summary
pack-priv static BaggageBuilder builder()

Hides io.opentelemetry.api.baggage.Baggage.builder.

Doc from io.opentelemetry.api.baggage.Baggage.builder.

Creates a new BaggageBuilder for creating Baggage.

emptyback to summary
pack-priv static Baggage empty()

Hides io.opentelemetry.api.baggage.Baggage.empty.

Doc from io.opentelemetry.api.baggage.Baggage.empty.

Baggage with no entries.

getEntryback to summary
public BaggageEntry getEntry(String entryKey)

Overrides default io.opentelemetry.api.baggage.Baggage.getEntry.

Doc from io.opentelemetry.api.baggage.Baggage.getEntry.

Returns the BaggageEntry associated with the given key.

Parameters
entryKey:String

entry key to return the BaggageEntry for, or null if no Entry with the given entryKey is in this Baggage.

Annotations
@Nullable
@Override
getEntryValueback to summary
public String getEntryValue(String entryKey)

Implements io.opentelemetry.api.baggage.Baggage.getEntryValue.

Doc from io.opentelemetry.api.baggage.Baggage.getEntryValue.

Returns the String value associated with the given key, without metadata.

Parameters
entryKey:String

entry key to return the value for.

Returns:String

the value associated with the given key, or null if no Entry with the given entryKey is in this Baggage.

Annotations
@Nullable
@Override
sortAndFilterToBaggageback to summary
private static Baggage sortAndFilterToBaggage(Object[] data)
toBuilderback to summary
public BaggageBuilder toBuilder()

Implements io.opentelemetry.api.baggage.Baggage.toBuilder.

Doc from io.opentelemetry.api.baggage.Baggage.toBuilder.

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.

Annotations
@Override
io.opentelemetry.api.baggage back to summary

pack-priv Class ImmutableBaggage.Builder

extends Object
implements BaggageBuilder
Class Inheritance
All Implemented Interfaces
io.opentelemetry.api.baggage.BaggageBuilder

Field Summary

Modifier and TypeField and Description
private final List<Object>

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Baggage
build()

Implements io.opentelemetry.api.baggage.BaggageBuilder.build.

Creates a Baggage from this builder.

public BaggageBuilder
put(String
the String key which will be set.
key
,
String
the String value to set for the given key.
value
,
BaggageEntryMetadata
the BaggageEntryMetadata metadata to set for the given key.
entryMetadata
)

Implements io.opentelemetry.api.baggage.BaggageBuilder.put.

Adds the key/value pair and metadata regardless of whether the key is present.

public BaggageBuilder
remove(String
the String key which will be removed.
key
)

Implements io.opentelemetry.api.baggage.BaggageBuilder.remove.

Removes the key if it exists.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private final List<Object> data

Constructor Detail

Builderback to summary
pack-priv Builder()
Builderback to summary
pack-priv Builder(List<Object> data)

Method Detail

buildback to summary
public Baggage build()

Implements io.opentelemetry.api.baggage.BaggageBuilder.build.

Doc from io.opentelemetry.api.baggage.BaggageBuilder.build.

Creates a Baggage from this builder.

Returns:Baggage

a Baggage with the same entries as this builder.

Annotations
@Override
putback to summary
public BaggageBuilder put(String key, String value, BaggageEntryMetadata entryMetadata)

Implements io.opentelemetry.api.baggage.BaggageBuilder.put.

Doc from io.opentelemetry.api.baggage.BaggageBuilder.put.

Adds the key/value pair and metadata regardless of whether the key is present.

Parameters
key:String

the String key which will be set.

value:String

the String value to set for the given key.

entryMetadata:BaggageEntryMetadata

the BaggageEntryMetadata metadata to set for the given key.

Returns:BaggageBuilder

this

Annotations
@Override
removeback to summary
public BaggageBuilder remove(String key)

Implements io.opentelemetry.api.baggage.BaggageBuilder.remove.

Doc from io.opentelemetry.api.baggage.BaggageBuilder.remove.

Removes the key if it exists.

Parameters
key:String

the String key which will be removed.

Returns:BaggageBuilder

this

Annotations
@Override