Interface MetadataSerde<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T deserialize​(java.lang.String path, byte[] content, Stat stat)
      Serialize the object from a byte array.
      byte[] serialize​(java.lang.String path, T value)
      Serialize the object into a byte array.
    • Method Detail

      • serialize

        byte[] serialize​(java.lang.String path,
                         T value)
                  throws java.io.IOException
        Serialize the object into a byte array.
        Parameters:
        path - the path of the object on the metadata store
        value - the object instance
        Returns:
        a byte array of the serialized version
        Throws:
        java.io.IOException - if the serialization fails
      • deserialize

        T deserialize​(java.lang.String path,
                      byte[] content,
                      Stat stat)
               throws java.io.IOException
        Serialize the object from a byte array.
        Parameters:
        path - the path of the object on the metadata store
        content - the content as stored on metadata store
        stat - the Stat metadata for the object
        Returns:
        the deserialized object
        Throws:
        java.io.IOException - if the deserialization fails