Interface Transcoder

All Known Implementing Classes:
JsonTranscoder, LegacyTranscoder, RawBinaryTranscoder, RawJsonTranscoder, RawStringTranscoder, Sdk2CompatibleLegacyTranscoder, SerializableTranscoder

public interface Transcoder
The transcoder is responsible for transcoding KV binary packages between their binary and their java object representation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Represents the tuple of encoded value and flags to be used on the wire.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    decode(TypeRef<T> target, byte[] input, int flags)
    Decodes the wire representation into the entity based on the data format.
    <T> T
    decode(Class<T> target, byte[] input, int flags)
    Decodes the wire representation into the entity based on the data format.
    encode(Object input)
    Encodes the given input into the wire representation based on the data format.
  • Method Details

    • encode

      Encodes the given input into the wire representation based on the data format.
      Parameters:
      input - the input object to encode.
      Returns:
      the encoded wire representation of the payload.
    • decode

      <T> T decode(Class<T> target, byte[] input, int flags)
      Decodes the wire representation into the entity based on the data format.
      Type Parameters:
      T - the generic type used for the decoding target.
      Parameters:
      target - the target type to decode.
      input - the wire representation to decode.
      flags - the flags on the wire
      Returns:
      the decoded entity.
    • decode

      default <T> T decode(TypeRef<T> target, byte[] input, int flags)
      Decodes the wire representation into the entity based on the data format.
      Type Parameters:
      T - the generic type used for the decoding target.
      Parameters:
      target - the target type to decode.
      input - the wire representation to decode.
      flags - the flags on the wire
      Returns:
      the decoded entity.