A - first tuple valueB - second tuple valueC - third tuple valuepublic static class BTreeKeySerializer.Tuple4KeySerializer<A,B,C,D> extends BTreeKeySerializer<Fun.Tuple4<A,B,C,D>> implements Serializable
Value Serialized as
----------------------------------
Tuple(1, 2, 1, 1) 1, 2, 1, 1
Tuple(1, 2, 1, 2) 2
Tuple(1, 3, 3, 3) 3, 3, 3
Tuple(1, 3, 4, 4) 4, 4
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>| Modifier and Type | Field and Description |
|---|---|
protected Comparator<A> |
aComparator |
protected Serializer<A> |
aSerializer |
protected Comparator<B> |
bComparator |
protected Serializer<B> |
bSerializer |
protected Comparator<C> |
cComparator |
protected Serializer<C> |
cSerializer |
protected Serializer<D> |
dSerializer |
BASIC, STRING, TUPLE2, TUPLE3, TUPLE4, ZERO_OR_POSITIVE_INT, ZERO_OR_POSITIVE_LONG| Constructor and Description |
|---|
Tuple4KeySerializer(Comparator<A> aComparator,
Comparator<B> bComparator,
Comparator<C> cComparator,
Serializer<A> aSerializer,
Serializer<B> bSerializer,
Serializer<C> cSerializer,
Serializer<D> dSerializer)
Construct new Tuple4 Key Serializer.
|
| Modifier and Type | Method and Description |
|---|---|
Object[] |
deserialize(DataInput in,
int start,
int end,
int size)
Deserializes keys for single BTree Node.
|
boolean |
equals(Object o) |
Comparator<Fun.Tuple4<A,B,C,D>> |
getComparator()
Some key serializers may only work with they own comparators.
|
int |
hashCode() |
void |
serialize(DataOutput out,
int start,
int end,
Object[] keys)
Serialize keys from single BTree Node.
|
leadingValuePackRead, leadingValuePackWriteprotected final Comparator<A> aComparator
protected final Comparator<B> bComparator
protected final Comparator<C> cComparator
protected final Serializer<A> aSerializer
protected final Serializer<B> bSerializer
protected final Serializer<C> cSerializer
protected final Serializer<D> dSerializer
public Tuple4KeySerializer(Comparator<A> aComparator, Comparator<B> bComparator, Comparator<C> cComparator, Serializer<A> aSerializer, Serializer<B> bSerializer, Serializer<C> cSerializer, Serializer<D> dSerializer)
aComparator - comparator used for first tuple valuebComparator - comparator used for second tuple valuecComparator - comparator used for third tuple value*aSerializer - serializer used for first tuple valuebSerializer - serializer used for second tuple valuecSerializer - serializer used for third tuple valuedSerializer - serializer used for fourth tuple valuepublic void serialize(DataOutput out, int start, int end, Object[] keys) throws IOException
BTreeKeySerializerserialize in class BTreeKeySerializer<Fun.Tuple4<A,B,C,D>>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 NodeIOExceptionpublic Object[] deserialize(DataInput in, int start, int end, int size) throws IOException
BTreeKeySerializerdeserialize in class BTreeKeySerializer<Fun.Tuple4<A,B,C,D>>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 returnedIOExceptionpublic Comparator<Fun.Tuple4<A,B,C,D>> getComparator()
BTreeKeySerializergetComparator in class BTreeKeySerializer<Fun.Tuple4<A,B,C,D>>Copyright © 2024. All rights reserved.