T - type of the object to deserializepublic interface BytesDecoder<T>
ArrayList<Span> out = new ArrayList<>();
SpanBytesDecoder.JSON_V2.decodeList(spans, out)
| Modifier and Type | Method and Description |
|---|---|
boolean |
decode(byte[] serialized,
Collection<T> out)
This is used seldomly as the canonical message form is a
list. |
List<T> |
decodeList(byte[] serialized)
Convenience method for
decodeList(byte[], Collection) |
boolean |
decodeList(byte[] serialized,
Collection<T> out) |
T |
decodeOne(byte[] serialized)
Visible for testing.
|
Encoding |
encoding() |
Encoding encoding()
boolean decode(byte[] serialized,
Collection<T> out)
list.
Note: multiple elements can be consumed from a single serialized object. For example, if the input is Zipkin v1, the list might receive two elements if the serialized object was a shared span.
serialized - a single message, for example a json object{@linkplain - IllegalArgumentException} if the type couldn't be decoded@Nullable T decodeOne(byte[] serialized)
boolean decodeList(byte[] serialized,
Collection<T> out)
{@linkplain - IllegalArgumentException} if the type couldn't be decodedList<T> decodeList(byte[] serialized)
decodeList(byte[], Collection)Copyright © 2015–2019 OpenZipkin. All rights reserved.