Package zipkin2.codec
Enum Encoding
- java.lang.Object
-
- java.lang.Enum<Encoding>
-
- zipkin2.codec.Encoding
-
- All Implemented Interfaces:
Serializable
,Comparable<Encoding>
public enum Encoding extends Enum<Encoding>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
listSizeInBytes(int encodedSizeInBytes)
LikelistSizeInBytes(List)
, except for a single element.abstract int
listSizeInBytes(List<byte[]> values)
static Encoding
valueOf(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.
-
-
-
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 proto3The 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(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
listSizeInBytes
public abstract int listSizeInBytes(int encodedSizeInBytes)
LikelistSizeInBytes(List)
, except for a single element.
-
listSizeInBytes
public abstract int listSizeInBytes(List<byte[]> values)
-
-