Class VersionedIOReadableWritable

    • Constructor Detail

      • VersionedIOReadableWritable

        public VersionedIOReadableWritable()
    • Method Detail

      • read

        public void read​(DataInputView in)
                  throws IOException
        Description copied from interface: IOReadableWritable
        Reads the object's internal data from the given data input view.
        Specified by:
        read in interface IOReadableWritable
        Parameters:
        in - the input view to read the data from
        Throws:
        IOException - thrown if any error occurs while reading from the input stream
      • getReadVersion

        public int getReadVersion()
        Returns the found serialization version. If this instance was not read from serialized bytes but simply instantiated, then the current version is returned.
        Returns:
        the read serialization version, or the current version if the instance was not read from bytes.
      • getCompatibleVersions

        public int[] getCompatibleVersions()
        Returns the compatible version values.

        By default, the base implementation recognizes only the current version (identified by Versioned.getVersion()) as compatible. This method can be used as a hook and may be overridden to identify more compatible versions.

        Returns:
        an array of integers representing the compatible version values.
      • getAdditionalDetailsForIncompatibleVersion

        public Optional<String> getAdditionalDetailsForIncompatibleVersion​(int readVersion)