K - the type to be serializedpublic static class BufferManager.PackedStringKeySerializer<K extends Comparable<K>> extends org.mapdb.BTreeKeySerializer<K> implements Serializable, BufferManager.KeySerializerWithComparator<K>
java.lang.String. This serializer splits consequent strings to two parts: shared prefix
and different suffix. Only suffix is than stored.org.mapdb.BTreeKeySerializer.BasicKeySerializer, org.mapdb.BTreeKeySerializer.Tuple2KeySerializer<A,B>, org.mapdb.BTreeKeySerializer.Tuple3KeySerializer<A,B,C>, org.mapdb.BTreeKeySerializer.Tuple4KeySerializer<A,B,C,D>, org.mapdb.BTreeKeySerializer.Tuple5KeySerializer<A,B,C,D,E>, org.mapdb.BTreeKeySerializer.Tuple6KeySerializer<A,B,C,D,E,F>| Modifier and Type | Field and Description |
|---|---|
protected Comparator<K> |
comparator |
| Modifier | Constructor and Description |
|---|---|
|
BufferManager.PackedStringKeySerializer(StringFactory stringFactory,
ValueFactory<K> valueFactory) |
protected |
BufferManager.PackedStringKeySerializer(StringFactory stringFactory,
ValueFactory<K> valueFactory,
Comparator<K> comparator) |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
deserialize(DataInput in,
int start,
int end,
int size) |
Comparator<K> |
getComparator() |
void |
serialize(DataOutput out,
int start,
int end,
Object[] keys) |
String |
toString() |
org.mapdb.BTreeKeySerializer<K> |
withComparator(Comparator<?> comparator) |
protected final transient Comparator<K extends Comparable<K>> comparator
public BufferManager.PackedStringKeySerializer(StringFactory stringFactory, ValueFactory<K> valueFactory)
protected BufferManager.PackedStringKeySerializer(StringFactory stringFactory, ValueFactory<K> valueFactory, Comparator<K> comparator)
public org.mapdb.BTreeKeySerializer<K> withComparator(Comparator<?> comparator)
withComparator in interface BufferManager.KeySerializerWithComparator<K extends Comparable<K>>public Comparator<K> getComparator()
getComparator in class org.mapdb.BTreeKeySerializer<K extends Comparable<K>>public void serialize(DataOutput out, int start, int end, Object[] keys) throws IOException
serialize in class org.mapdb.BTreeKeySerializer<K extends Comparable<K>>IOExceptionpublic Object[] deserialize(DataInput in, int start, int end, int size) throws IOException
deserialize in class org.mapdb.BTreeKeySerializer<K extends Comparable<K>>IOExceptionCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.