A - first tuple valueB - second tuple valueC - third tuple valuepublic static class BTreeKeySerializer.Tuple3KeySerializer<A,B,C> extends BTreeKeySerializer<Fun.Tuple3<A,B,C>> implements Serializable
Value Serialized as
----------------------------
Tuple(1, 2, 1) 1, 2, 1
Tuple(1, 2, 2) 2
Tuple(1, 3, 3) 3, 3
Tuple(1, 3, 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 Serializer<C> |
cSerializer |
BASIC, STRING, TUPLE2, TUPLE3, TUPLE4, ZERO_OR_POSITIVE_INT, ZERO_OR_POSITIVE_LONG| Constructor and Description |
|---|
Tuple3KeySerializer(Comparator<A> aComparator,
Comparator<B> bComparator,
Serializer<A> aSerializer,
Serializer<B> bSerializer,
Serializer<C> cSerializer)
Construct new Tuple3 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.Tuple3<A,B,C>> |
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 Serializer<A> aSerializer
protected final Serializer<B> bSerializer
protected final Serializer<C> cSerializer
public Tuple3KeySerializer(Comparator<A> aComparator, Comparator<B> bComparator, Serializer<A> aSerializer, Serializer<B> bSerializer, Serializer<C> cSerializer)
aComparator - comparator used for first tuple valuebComparator - comparator used for second tuple valueaSerializer - serializer used for first tuple valuebSerializer - serializer used for second tuple valuecSerializer - serializer used for third tuple valuepublic void serialize(DataOutput out, int start, int end, Object[] keys) throws IOException
BTreeKeySerializerserialize in class BTreeKeySerializer<Fun.Tuple3<A,B,C>>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.Tuple3<A,B,C>>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.Tuple3<A,B,C>> getComparator()
BTreeKeySerializergetComparator in class BTreeKeySerializer<Fun.Tuple3<A,B,C>>Copyright © 2024. All rights reserved.