Class AttributeKeyValueStatelessMarshaler
- java.lang.Object
-
- io.opentelemetry.exporter.internal.otlp.AttributeKeyValueStatelessMarshaler
-
- All Implemented Interfaces:
StatelessMarshaler2<AttributeKey<?>,java.lang.Object>
public final class AttributeKeyValueStatelessMarshaler extends java.lang.Object implements StatelessMarshaler2<AttributeKey<?>,java.lang.Object>
A Marshaler of key value pairs. SeeKeyValueMarshaler
.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 Classes Modifier and Type Class Description private static class
AttributeKeyValueStatelessMarshaler.ValueStatelessMarshaler
-
Field Summary
Fields Modifier and Type Field Description private static byte[]
EMPTY_BYTES
static AttributeKeyValueStatelessMarshaler
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
AttributeKeyValueStatelessMarshaler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBinarySerializedSize(AttributeKey<?> attributeKey, java.lang.Object value, MarshalerContext context)
Returns the number of bytes this Marshaler will write.void
writeTo(Serializer output, AttributeKey<?> attributeKey, java.lang.Object value, MarshalerContext context)
Marshal given key and value using the providedSerializer
.
-
-
-
Field Detail
-
INSTANCE
public static final AttributeKeyValueStatelessMarshaler INSTANCE
-
EMPTY_BYTES
private static final byte[] EMPTY_BYTES
-
-
Method Detail
-
writeTo
public void writeTo(Serializer output, AttributeKey<?> attributeKey, java.lang.Object value, MarshalerContext context) throws java.io.IOException
Description copied from interface:StatelessMarshaler2
Marshal given key and value using the providedSerializer
.- Specified by:
writeTo
in interfaceStatelessMarshaler2<AttributeKey<?>,java.lang.Object>
- Throws:
java.io.IOException
-
getBinarySerializedSize
public int getBinarySerializedSize(AttributeKey<?> attributeKey, java.lang.Object value, MarshalerContext context)
Description copied from interface:StatelessMarshaler2
Returns the number of bytes this Marshaler will write.- Specified by:
getBinarySerializedSize
in interfaceStatelessMarshaler2<AttributeKey<?>,java.lang.Object>
-
-