Class MarshalerWithSize

java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
Direct Known Subclasses:
ArrayAnyValueMarshaler, ArrayAnyValueMarshaler.ArrayValueMarshaler, BoolAnyValueMarshaler, BytesAnyValueMarshaler, DoubleAnyValueMarshaler, ExemplarMarshaler, ExponentialHistogramBucketsMarshaler, ExponentialHistogramDataPointMarshaler, ExponentialHistogramMarshaler, GaugeMarshaler, HistogramDataPointMarshaler, HistogramMarshaler, InstrumentationScopeLogsMarshaler, InstrumentationScopeMarshaler, InstrumentationScopeMarshaler.RealInstrumentationScopeMarshaler, InstrumentationScopeMetricsMarshaler, InstrumentationScopeSpansMarshaler, IntAnyValueMarshaler, KeyValueListAnyValueMarshaler, KeyValueListAnyValueMarshaler.KeyValueListMarshaler, KeyValueMarshaler, LogMarshaler, LogsRequestMarshaler, MetricMarshaler, MetricsRequestMarshaler, NoopMarshaler, NumberDataPointMarshaler, ResourceLogsMarshaler, ResourceMarshaler, ResourceMarshaler.RealResourceMarshaler, ResourceMetricsMarshaler, ResourceSpansMarshaler, SpanEventMarshaler, SpanLinkMarshaler, SpanMarshaler, SpanStatusMarshaler, StringAnyValueMarshaler, SumMarshaler, SummaryDataPointMarshaler, SummaryMarshaler, TraceRequestMarshaler, ValueAtQuantileMarshaler

public abstract class MarshalerWithSize extends Marshaler
A Marshaler which returns a memoized size.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Field Details

    • size

      private final int size
  • Constructor Details

    • MarshalerWithSize

      protected MarshalerWithSize(int size)
  • Method Details

    • getBinarySerializedSize

      public final int getBinarySerializedSize()
      Description copied from class: Marshaler
      Returns the number of bytes this Marshaler will write in proto binary format.
      Specified by:
      getBinarySerializedSize in class Marshaler