|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.keys.KVO<O>
O - The generic type of the unserialized value object.public class KVO<O>
A key-value-object tuple. Comparison places the KVO tuples into an
order based on the interpretation of their keys 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.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
KVO(byte[] key,
byte[] val)
|
|
KVO(byte[] key,
byte[] val,
O obj)
|
|
| Method Summary | ||
|---|---|---|
int |
compareTo(KVO<O> arg0)
|
|
static
|
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()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final byte[] key
public final byte[] val
public final O obj
val is
given).
| Constructor Detail |
|---|
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).| Method Detail |
|---|
public void done()
KVO has been
written onto the index by an asynchronous write operation.
KVOC overrides this method to support notification when
all tuples generated within some scope have been written onto the
database.
public int compareTo(KVO<O> arg0)
compareTo in interface Comparable<KVO<O>>public String toString()
toString in class Objectpublic 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.
public static <T> KVO<T>[] dense(KVO<T>[] a,
int len)
a - The array.len - The #of elements in the array [0:len-1].
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||