Class AttributeKeyValueStatelessMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.otlp.AttributeKeyValueStatelessMarshaler
- All Implemented Interfaces:
StatelessMarshaler2<AttributeKey<?>,
Object>
public final class AttributeKeyValueStatelessMarshaler
extends Object
implements StatelessMarshaler2<AttributeKey<?>,Object>
A Marshaler of key value pairs. See
KeyValueMarshaler
.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
static final AttributeKeyValueStatelessMarshaler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getBinarySerializedSize
(AttributeKey<?> attributeKey, Object value, MarshalerContext context) Returns the number of bytes this Marshaler will write.void
writeTo
(Serializer output, AttributeKey<?> attributeKey, Object value, MarshalerContext context) Marshal given key and value using the providedSerializer
.
-
Field Details
-
INSTANCE
-
EMPTY_BYTES
private static final byte[] EMPTY_BYTES
-
-
Constructor Details
-
AttributeKeyValueStatelessMarshaler
private AttributeKeyValueStatelessMarshaler()
-
-
Method Details
-
writeTo
public void writeTo(Serializer output, AttributeKey<?> attributeKey, Object value, MarshalerContext context) throws IOException Description copied from interface:StatelessMarshaler2
Marshal given key and value using the providedSerializer
.- Specified by:
writeTo
in interfaceStatelessMarshaler2<AttributeKey<?>,
Object> - Throws:
IOException
-
getBinarySerializedSize
public int getBinarySerializedSize(AttributeKey<?> attributeKey, Object value, MarshalerContext context) Description copied from interface:StatelessMarshaler2
Returns the number of bytes this Marshaler will write.- Specified by:
getBinarySerializedSize
in interfaceStatelessMarshaler2<AttributeKey<?>,
Object>
-