DataType
A data type.
| Methods |
| int |
compare(Object a, Object b)
Compare two keys.
|
| int |
compare(Object a, Object b)
Compare two keys.
Parameters:
a - the first key
b - the second key
Returns:
-1 if the first key is smaller, 1 if larger, and 0 if equal
Throws:
UnsupportedOperationException - if the type is not orderable
|
| int |
getMemory(Object obj)
Estimate the used memory in bytes.
|
| int |
getMemory(Object obj)
Estimate the used memory in bytes.
Parameters:
obj - the object
Returns:
the used memory
|
| Object |
read(ByteBuffer buff)
Read an object.
|
| Object |
read(ByteBuffer buff)
Read an object.
Parameters:
buff - the source buffer
Returns:
the object
|
| void |
read(ByteBuffer buff, Object[] obj, int len, boolean key)
Read a list of objects.
|
| void |
read(ByteBuffer buff, Object[] obj, int len, boolean key)
Read a list of objects.
Parameters:
buff - the target buffer
obj - the objects
len - the number of objects to read
key - whether the objects are keys
|
| void |
write(WriteBuffer buff, Object obj)
Write an object.
|
| void |
write(WriteBuffer buff, Object obj)
Write an object.
Parameters:
buff - the target buffer
obj - the value
|
| void |
write(WriteBuffer buff, Object[] obj, int len, boolean key)
Write a list of objects.
|
| void |
write(WriteBuffer buff, Object[] obj, int len, boolean key)
Write a list of objects.
Parameters:
buff - the target buffer
obj - the objects
len - the number of objects to write
key - whether the objects are keys
|
|