TargetType - Type of the object to serialize.ReaderType - Type of the object to deserialize to.protected static class VersionedSerializer.FormatVersion<TargetType,ReaderType>
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
VersionedSerializer.FormatVersion<TargetType,ReaderType> |
revision(int revision,
VersionedSerializer.StreamWriter<TargetType> writer,
VersionedSerializer.StreamReader<ReaderType> reader)
Creates a new Revision and registers it.
|
public VersionedSerializer.FormatVersion<TargetType,ReaderType> revision(int revision, VersionedSerializer.StreamWriter<TargetType> writer, VersionedSerializer.StreamReader<ReaderType> reader)
revision - The Revision Id. If the first revision in the Version, this must be 0. If not, it must be the next
number higher than the previous Revision Id (revisions ids are incremental numbers).writer - A Function that will serialize the contents of the target object into this Revision's Format.reader - A Function that will deserialize data pertaining to this Revision's Format into the target object.