public interface DataType
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compare(Object a,
Object b)
Compare two keys.
|
int |
getMemory(Object obj)
Estimate the used memory in bytes.
|
Object |
read(ByteBuffer buff)
Read an object.
|
void |
read(ByteBuffer buff,
Object[] obj,
int len,
boolean key)
Read a list of objects.
|
void |
write(WriteBuffer buff,
Object obj)
Write an object.
|
void |
write(WriteBuffer buff,
Object[] obj,
int len,
boolean key)
Write a list of objects.
|
int compare(Object a, Object b)
a - the first keyb - the second keyUnsupportedOperationException - if the type is not orderableint getMemory(Object obj)
obj - the objectvoid write(WriteBuffer buff, Object obj)
buff - the target bufferobj - the valuevoid write(WriteBuffer buff, Object[] obj, int len, boolean key)
buff - the target bufferobj - the objectslen - the number of objects to writekey - whether the objects are keysObject read(ByteBuffer buff)
buff - the source buffervoid read(ByteBuffer buff, Object[] obj, int len, boolean key)
buff - the target bufferobj - the objectslen - the number of objects to readkey - whether the objects are keysCopyright © 2017. All rights reserved.