All Known Implementing Classes:
AppIdKeyConverter, EventColumnNameConverter, LongKeyConverter, StringKeyConverter

public interface KeyConverter<T>
Interface which has to be implemented for encoding and decoding row keys and columns.
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(byte[] bytes)
    Decodes a byte array and returns a key of type T.
    byte[]
    encode(T key)
    Encodes a key as a byte array.
  • Method Details

    • encode

      byte[] encode(T key)
      Encodes a key as a byte array.
      Parameters:
      key - key to be encoded.
      Returns:
      a byte array.
    • decode

      T decode(byte[] bytes)
      Decodes a byte array and returns a key of type T.
      Parameters:
      bytes - byte representation
      Returns:
      an object(key) of type T which has been constructed after decoding the bytes.