public interface VersionedSerializer<T>
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(int version,
byte[] serialized)
De-serializes the given data (bytes) which was serialized with the scheme of the indicated
version.
|
int |
getVersion()
Gets the version with which this serializer serializes.
|
byte[] |
serialize(T obj)
Serializes the given object.
|
int getVersion()
byte[] serialize(T obj) throws IOException
getVersion().obj - The object to serialize.IOException - Thrown, if the serialization fails.T deserialize(int version, byte[] serialized) throws IOException
version - The version in which the data was serializedserialized - The serialized dataIOException - Thrown, if the deserialization fails.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.