A
- first tuple valueB
- second tuple valueC
- third tuple valuepublic static class BTreeKeySerializer.Tuple5KeySerializer<A,B,C,D,E> extends BTreeKeySerializer<Fun.Tuple5<A,B,C,D,E>> 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 Comparator<D> |
dComparator |
protected Serializer<D> |
dSerializer |
protected Serializer<E> |
eSerializer |
BASIC, STRING, TUPLE2, TUPLE3, TUPLE4, ZERO_OR_POSITIVE_INT, ZERO_OR_POSITIVE_LONG
Constructor and Description |
---|
Tuple5KeySerializer(Comparator<A> aComparator,
Comparator<B> bComparator,
Comparator<C> cComparator,
Comparator<D> dComparator,
Serializer<A> aSerializer,
Serializer<B> bSerializer,
Serializer<C> cSerializer,
Serializer<D> dSerializer,
Serializer<E> eSerializer)
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.Tuple5<A,B,C,D,E>> |
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, leadingValuePackWrite
protected final Comparator<A> aComparator
protected final Comparator<B> bComparator
protected final Comparator<C> cComparator
protected final Comparator<D> dComparator
protected final Serializer<A> aSerializer
protected final Serializer<B> bSerializer
protected final Serializer<C> cSerializer
protected final Serializer<D> dSerializer
protected final Serializer<E> eSerializer
public Tuple5KeySerializer(Comparator<A> aComparator, Comparator<B> bComparator, Comparator<C> cComparator, Comparator<D> dComparator, Serializer<A> aSerializer, Serializer<B> bSerializer, Serializer<C> cSerializer, Serializer<D> dSerializer, Serializer<E> eSerializer)
public void serialize(DataOutput out, int start, int end, Object[] keys) throws IOException
BTreeKeySerializer
serialize
in class BTreeKeySerializer<Fun.Tuple5<A,B,C,D,E>>
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 NodeIOException
public Object[] deserialize(DataInput in, int start, int end, int size) throws IOException
BTreeKeySerializer
deserialize
in class BTreeKeySerializer<Fun.Tuple5<A,B,C,D,E>>
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 returnedIOException
public Comparator<Fun.Tuple5<A,B,C,D,E>> getComparator()
BTreeKeySerializer
getComparator
in class BTreeKeySerializer<Fun.Tuple5<A,B,C,D,E>>
Copyright © 2016. All rights reserved.