Package zipkin2.codec

Enum Encoding

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Encoding>

    public enum Encoding
    extends java.lang.Enum<Encoding>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      JSON  
      PROTO3
      Repeated (type 2) fields are length-prefixed.
      THRIFT
      Deprecated.
      this format is deprecated in favor of json or proto3
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract int listSizeInBytes​(int encodedSizeInBytes)
      Like listSizeInBytes(List), except for a single element.
      abstract int listSizeInBytes​(java.util.List<byte[]> values)  
      static Encoding valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Encoding[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • JSON

        public static final Encoding JSON
      • THRIFT

        @Deprecated
        public static final Encoding THRIFT
        Deprecated.
        this format is deprecated in favor of json or proto3
        The first format of Zipkin was TBinaryProtocol, big-endian thrift. It is no longer used, but defined here to allow collectors to support reading old data.

        The message's binary data includes a list header followed by N spans serialized in TBinaryProtocol

      • PROTO3

        public static final Encoding PROTO3
        Repeated (type 2) fields are length-prefixed. A list is a concatenation of fields with no additional overhead.

        See https://developers.google.com/protocol-buffers/docs/encoding#optional

    • Method Detail

      • values

        public static Encoding[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Encoding c : Encoding.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Encoding valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • listSizeInBytes

        public abstract int listSizeInBytes​(int encodedSizeInBytes)
        Like listSizeInBytes(List), except for a single element.
      • listSizeInBytes

        public abstract int listSizeInBytes​(java.util.List<byte[]> values)