22 lines
663 B
Java
22 lines
663 B
Java
|
package it.cavallium.dbengine.database.remote;
|
||
|
|
||
|
import it.cavallium.data.generator.DataSerializer;
|
||
|
import it.cavallium.dbengine.database.LLSnapshot;
|
||
|
import java.io.DataInput;
|
||
|
import java.io.DataOutput;
|
||
|
import java.io.IOException;
|
||
|
import org.jetbrains.annotations.NotNull;
|
||
|
|
||
|
public class LLSnapshotSerializer implements DataSerializer<LLSnapshot> {
|
||
|
|
||
|
@Override
|
||
|
public void serialize(DataOutput dataOutput, @NotNull LLSnapshot llSnapshot) throws IOException {
|
||
|
dataOutput.writeLong(llSnapshot.getSequenceNumber());
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public @NotNull LLSnapshot deserialize(DataInput dataInput) throws IOException {
|
||
|
return new LLSnapshot(dataInput.readLong());
|
||
|
}
|
||
|
}
|