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