All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scray.common.serialization.BatchIDSerializer Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
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