Interface DiffableUtils.ValueSerializer<K,​V>

    • Method Summary

      Modifier and Type Method Description
      Diff<V> diff​(V value, V beforePart)
      Computes diff if this serializer supports diffable values
      V read​(StreamInput in, K key)
      Reads value from stream.
      Diff<V> readDiff​(StreamInput in, K key)
      Reads value as diff from stream if this serializer supports diffable values.
      boolean supportsDiffableValues()
      Whether this serializer supports diffable values
      default boolean supportsVersion​(Diff<V> value, Version version)
      Whether this serializer supports the version of the output stream
      default boolean supportsVersion​(V value, Version version)
      Whether this serializer supports the version of the output stream
      void write​(V value, StreamOutput out)
      Writes value to stream
      void writeDiff​(Diff<V> value, StreamOutput out)
      Writes value as diff to stream if this serializer supports diffable values
    • Method Detail

      • write

        void write​(V value,
                   StreamOutput out)
            throws java.io.IOException
        Writes value to stream
        Throws:
        java.io.IOException
      • read

        V read​(StreamInput in,
               K key)
        throws java.io.IOException
        Reads value from stream. Reading operation can be made dependent on map key.
        Throws:
        java.io.IOException
      • supportsDiffableValues

        boolean supportsDiffableValues()
        Whether this serializer supports diffable values
      • supportsVersion

        default boolean supportsVersion​(Diff<V> value,
                                        Version version)
        Whether this serializer supports the version of the output stream
      • supportsVersion

        default boolean supportsVersion​(V value,
                                        Version version)
        Whether this serializer supports the version of the output stream
      • diff

        Diff<V> diff​(V value,
                     V beforePart)
        Computes diff if this serializer supports diffable values
      • writeDiff

        void writeDiff​(Diff<V> value,
                       StreamOutput out)
                throws java.io.IOException
        Writes value as diff to stream if this serializer supports diffable values
        Throws:
        java.io.IOException
      • readDiff

        Diff<V> readDiff​(StreamInput in,
                         K key)
                  throws java.io.IOException
        Reads value as diff from stream if this serializer supports diffable values. Reading operation can be made dependent on map key.
        Throws:
        java.io.IOException