/** * Returns the compatible version values. * * <p>By default, the base implementation recognizes only the current version (identified by {@link #getVersion()}) * as compatible. This method can be used as a hook and may be overridden to identify more compatible versions. * * @return an array of integers representing the compatible version values. */ public int[] getCompatibleVersions() { return new int[] {getVersion()}; }
/** * Returns the found serialization version. If this instance was not read from serialized bytes * but simply instantiated, then the current version is returned. * * @return the read serialization version, or the current version if the instance was not read from bytes. */ public int getReadVersion() { return (readVersion == Integer.MIN_VALUE) ? getVersion() : readVersion; }
@Override public void write(DataOutputView out) throws IOException { out.writeInt(getVersion()); }
/** * Returns the found serialization version. If this instance was not read from serialized bytes * but simply instantiated, then the current version is returned. * * @return the read serialization version, or the current version if the instance was not read from bytes. */ public int getReadVersion() { return (readVersion == Integer.MIN_VALUE) ? getVersion() : readVersion; }
/** * Returns the compatible version values. * * <p>By default, the base implementation recognizes only the current version (identified by {@link #getVersion()}) * as compatible. This method can be used as a hook and may be overridden to identify more compatible versions. * * @return an array of integers representing the compatible version values. */ public int[] getCompatibleVersions() { return new int[] {getVersion()}; }
/** * Returns the found serialization version. If this instance was not read from serialized bytes * but simply instantiated, then the current version is returned. * * @return the read serialization version, or the current version if the instance was not read from bytes. */ public int getReadVersion() { return (readVersion == Integer.MIN_VALUE) ? getVersion() : readVersion; }
/** * Returns the compatible version values. * * <p>By default, the base implementation recognizes only the current version (identified by {@link #getVersion()}) * as compatible. This method can be used as a hook and may be overridden to identify more compatible versions. * * @return an array of integers representing the compatible version values. */ public int[] getCompatibleVersions() { return new int[] {getVersion()}; }
@Override public void write(DataOutputView out) throws IOException { out.writeInt(getVersion()); }
@Override public void write(DataOutputView out) throws IOException { out.writeInt(getVersion()); }