public interface DataType
| Modifier and Type | Method and Description |
|---|---|
int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two keys.
|
int |
getMemory(java.lang.Object obj)
Estimate the used memory in bytes.
|
java.lang.Object |
read(java.nio.ByteBuffer buff)
Read an object.
|
void |
read(java.nio.ByteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
Read a list of objects.
|
void |
write(WriteBuffer buff,
java.lang.Object obj)
Write an object.
|
void |
write(WriteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
Write a list of objects.
|
int compare(java.lang.Object a,
java.lang.Object b)
a - the first keyb - the second keyjava.lang.UnsupportedOperationException - if the type is not orderableint getMemory(java.lang.Object obj)
obj - the objectvoid write(WriteBuffer buff, java.lang.Object obj)
buff - the target bufferobj - the valuevoid write(WriteBuffer buff, java.lang.Object[] obj, int len, boolean key)
buff - the target bufferobj - the objectslen - the number of objects to writekey - whether the objects are keysjava.lang.Object read(java.nio.ByteBuffer buff)
buff - the source buffervoid read(java.nio.ByteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
buff - the target bufferobj - the objectslen - the number of objects to readkey - whether the objects are keys