Interface ModelSerializer<T>

All Known Implementing Classes:
JacksonModelSerializer

public interface ModelSerializer<T>
Serializing interface for models
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ModelSerializer<byte[]>
    A pass through serializer
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(byte[] bytes)
    Given bytes serialized via serialize(Object) return the model
    byte[]
    serialize(T model)
    Given a model return the serialized bytes
  • Field Details

  • Method Details

    • serialize

      byte[] serialize(T model)
      Given a model return the serialized bytes
      Parameters:
      model - model
      Returns:
      bytes
    • deserialize

      T deserialize(byte[] bytes)
      Given bytes serialized via serialize(Object) return the model
      Parameters:
      bytes - serialized bytes
      Returns:
      model
      Throws:
      RuntimeException - if bytes is invalid or there was an error deserializing