O
- The generic type of the unserialized value object.public class KVO<O> extends Object implements Comparable<KVO<O>>
KVO
tuples into an
order based on the interpretation of their key
s as unsigned
byte[]s. This may be used to perform a correlated sort of keys and values.
This class may also be used to pair an optional unserialized representation
of the value Object
with the unsigned byte[] key and the serialized
byte[] value.Modifier and Type | Field and Description |
---|---|
byte[] |
key
The unsigned byte[] key (required).
|
O |
obj
The unserialized object value (optional, even when
val is
given). |
byte[] |
val
The serialized byte[] value (optional).
|
Constructor and Description |
---|
KVO(byte[] key,
byte[] val) |
KVO(byte[] key,
byte[] val,
O obj) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(KVO<O> arg0)
Imposes an
unsigned byte[] order on the KVO s. |
static <T> KVO<T>[] |
dense(KVO<T>[] a,
int len)
Return a dense array.
|
void |
done()
Method is invoked when the tuple represented by the
KVO has been
written onto the index by an asynchronous write operation. |
static byte[][] |
getKeys(KVO<?>[] chunk)
Return a dense array of the keys in a
KVO [] chunk. |
static byte[][] |
getVals(KVO<?>[] chunk)
Return a dense array of the values in a
KVO [] chunk. |
String |
toString() |
public final byte[] key
public final byte[] val
public KVO(byte[] key, byte[] val)
key
- The unsigned byte[] key (required).val
- The serialized byte[] value (optional).public KVO(byte[] key, byte[] val, O obj)
key
- The unsigned byte[] key (required).val
- The serialized byte[] value (optional).obj
- The unserialized object value (optional, even when val
is given).public void done()
public int compareTo(KVO<O> arg0)
unsigned byte[]
order on the KVO
s.compareTo
in interface Comparable<KVO<O>>
public static byte[][] getKeys(KVO<?>[] chunk)
KVO
[] chunk. The keys are
copied by reference, not by value.chunk
- A chunk of KVO
objects.public static byte[][] getVals(KVO<?>[] chunk)
KVO
[] chunk. The values
are copied by reference, not by value.chunk
- A chunk of KVO
objects.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.