org.mapdb
Class BTreeKeySerializer.BasicKeySerializer
java.lang.Object
org.mapdb.BTreeKeySerializer<Object>
org.mapdb.BTreeKeySerializer.BasicKeySerializer
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- BTreeKeySerializer<K>
public static final class BTreeKeySerializer.BasicKeySerializer
- extends BTreeKeySerializer<Object>
- implements Serializable
Basic Key Serializer which just writes data without applying any compression.
Is used by default if no other Key Serializer is specified.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class org.mapdb.BTreeKeySerializer |
BTreeKeySerializer.BasicKeySerializer, BTreeKeySerializer.Tuple2KeySerializer<A,B>, BTreeKeySerializer.Tuple3KeySerializer<A,B,C>, BTreeKeySerializer.Tuple4KeySerializer<A,B,C,D>, BTreeKeySerializer.Tuple5KeySerializer<A,B,C,D,E>, BTreeKeySerializer.Tuple6KeySerializer<A,B,C,D,E,F> |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultSerializer
protected final Serializer defaultSerializer
BTreeKeySerializer.BasicKeySerializer
public BTreeKeySerializer.BasicKeySerializer(Serializer defaultSerializer)
BTreeKeySerializer.BasicKeySerializer
protected BTreeKeySerializer.BasicKeySerializer(SerializerBase serializerBase,
DataInput is,
SerializerBase.FastArrayList<Object> objectStack)
throws IOException
- used for deserialization
- Throws:
IOException
serialize
public void serialize(DataOutput out,
int start,
int end,
Object[] keys)
throws IOException
- Description copied from class:
BTreeKeySerializer
- Serialize keys from single BTree Node.
- Specified by:
serialize in class BTreeKeySerializer<Object>
- Parameters:
out - output stream where to put atastart - where data start in array. Before this index all keys are nullend - where data ends in array (exclusive). From this index all keys are nullkeys - array of keys for single BTree Node
- Throws:
IOException
deserialize
public Object[] deserialize(DataInput in,
int start,
int end,
int size)
throws IOException
- Description copied from class:
BTreeKeySerializer
- Deserializes keys for single BTree Node. To
- Specified by:
deserialize in class BTreeKeySerializer<Object>
- Parameters:
in - input stream to read data fromstart - where data start in array. Before this index all keys are nullend - where data ends in array (exclusive). From this index all keys are nullsize - size of array which should be returned
- Returns:
- array of keys for single BTree Node
- Throws:
IOException
getComparator
public Comparator<Object> getComparator()
- Description copied from class:
BTreeKeySerializer
- Some key serializers may only work with they own comparators.
For example delta-packing stores increments between numbers and requires ascending order.
So Key Serializer may provide its own comparator.
- Specified by:
getComparator in class BTreeKeySerializer<Object>
- Returns:
- comparator which must be used with this method. `null` if comparator is not strictly required.
Copyright © 2014. All Rights Reserved.