Package io.opentelemetry.api.trace
Class ArrayBasedTraceState
java.lang.Object
io.opentelemetry.api.trace.ArrayBasedTraceState
- All Implemented Interfaces:
TraceState
- Direct Known Subclasses:
AutoValue_ArrayBasedTraceState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap()
Returns a read-only view of thisTraceState
as aMap
.(package private) static ArrayBasedTraceState
void
forEach
(BiConsumer<String, String> consumer) Iterates over all the key-value entries contained in thisTraceState
.Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.boolean
isEmpty()
Returns whether thisTraceState
is empty, containing no entries.int
size()
Returns the number of entries in thisTraceState
.Returns aBuilder
based on thisTraceState
.
-
Constructor Details
-
ArrayBasedTraceState
ArrayBasedTraceState()
-
-
Method Details
-
get
Description copied from interface:TraceState
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.- Specified by:
get
in interfaceTraceState
- Parameters:
key
- with which the specified value is to be associated- Returns:
- the value to which the specified key is mapped, or null if this map contains no mapping for the key.
-
size
public int size()Description copied from interface:TraceState
Returns the number of entries in thisTraceState
.- Specified by:
size
in interfaceTraceState
-
isEmpty
public boolean isEmpty()Description copied from interface:TraceState
Returns whether thisTraceState
is empty, containing no entries.- Specified by:
isEmpty
in interfaceTraceState
-
forEach
Description copied from interface:TraceState
Iterates over all the key-value entries contained in thisTraceState
.- Specified by:
forEach
in interfaceTraceState
-
asMap
Description copied from interface:TraceState
Returns a read-only view of thisTraceState
as aMap
.- Specified by:
asMap
in interfaceTraceState
-
getEntries
-
toBuilder
Description copied from interface:TraceState
Returns aBuilder
based on thisTraceState
.- Specified by:
toBuilder
in interfaceTraceState
- Returns:
- a
Builder
based on thisTraceState
.
-
create
-