scray.common.serialization.BatchIDSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scray-common Show documentation
Show all versions of scray-common Show documentation
scray artefacts shared between scala and java components
package scray.common.serialization;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.Serializer;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
/**
* Serializer for BatchIDs
*/
public class BatchIDSerializer extends Serializer {
@Override
public BatchID read(Kryo kryo, Input in, Class clazz) {
return new BatchID(in.readLong(), in.readLong());
}
@Override
public void write(Kryo kryo, Output output, BatchID batchID) {
output.writeLong(batchID.getBatchStart());
output.writeLong(batchID.getBatchEnd());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy