Class ResourceMarshaler
- java.lang.Object
-
- io.opentelemetry.exporter.internal.marshal.Marshaler
-
- io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
-
- io.opentelemetry.exporter.internal.otlp.ResourceMarshaler
-
public final class ResourceMarshaler extends MarshalerWithSize
A Marshaler ofResource
.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
ResourceMarshaler.RealResourceMarshaler
-
Field Summary
Fields Modifier and Type Field Description private static WeakConcurrentMap<Resource,ResourceMarshaler>
RESOURCE_MARSHALER_CACHE
private byte[]
serializedBinary
private java.lang.String
serializedJson
-
Constructor Summary
Constructors Modifier Constructor Description private
ResourceMarshaler(byte[] binary, java.lang.String json)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResourceMarshaler
create(Resource resource)
Returns a Marshaler for Resource.void
writeTo(Serializer output)
-
Methods inherited from class io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
getBinarySerializedSize
-
Methods inherited from class io.opentelemetry.exporter.internal.marshal.Marshaler
writeBinaryTo, writeJsonTo, writeJsonTo, writeJsonWithNewline
-
-
-
-
Field Detail
-
RESOURCE_MARSHALER_CACHE
private static final WeakConcurrentMap<Resource,ResourceMarshaler> RESOURCE_MARSHALER_CACHE
-
serializedBinary
private final byte[] serializedBinary
-
serializedJson
private final java.lang.String serializedJson
-
-
Method Detail
-
create
public static ResourceMarshaler create(Resource resource)
Returns a Marshaler for Resource.
-
writeTo
public void writeTo(Serializer output) throws java.io.IOException
-
-