org.mapdb.serializer.GroupSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mapdb Show documentation
Show all versions of mapdb Show documentation
MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory. It is a fast, scalable and easy to use embedded Java database.
package org.mapdb.serializer;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;
import java.io.IOException;
import java.util.Comparator;
/**
* Created by jan on 2/29/16.
*/
public interface GroupSerializer extends Serializer {
default A valueArrayBinaryGet(DataInput2 input, int keysLen, int pos) throws IOException {
Object keys = valueArrayDeserialize(input, keysLen);
return valueArrayGet(keys, pos);
// A a=null;
// while(pos-- >= 0){
// a = deserialize(input, -1);
// }
// return a;
}
default int valueArrayBinarySearch(A key, DataInput2 input, int keysLen, Comparator comparator) throws IOException {
Object keys = valueArrayDeserialize(input, keysLen);
return valueArraySearch(keys, key, comparator);
// for(int pos=0; pos
© 2015 - 2025 Weber Informatics LLC | Privacy Policy