public class ObjectDataType extends BasicDataType<Object>
| 构造器和说明 |
|---|
ObjectDataType() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compare(Object a,
Object b)
Compare two keys.
|
static int |
compareNotNull(byte[] data1,
byte[] data2)
Compare the contents of two byte arrays.
|
Object[] |
createStorage(int size)
Create storage object of array type to hold values
|
static Object |
deserialize(byte[] data)
De-serialize the byte array to an object.
|
int |
getMemory(Object obj)
Calculates the amount of used memory in bytes.
|
Object |
read(ByteBuffer buff)
Read an object.
|
static byte[] |
serialize(Object obj)
Serialize the object to a byte array.
|
void |
write(WriteBuffer buff,
Object obj)
Write an object.
|
binarySearch, cast, equals, hashCode, isMemoryEstimationAllowed, read, writepublic Object[] createStorage(int size)
DataTypesize - number of values to holdpublic int compare(Object a, Object b)
DataTypecompare 在接口中 Comparator<Object>compare 在接口中 DataType<Object>compare 在类中 BasicDataType<Object>a - the first keyb - the second keypublic int getMemory(Object obj)
DataTypepublic void write(WriteBuffer buff, Object obj)
DataTypepublic Object read(ByteBuffer buff)
DataTypepublic static byte[] serialize(Object obj)
obj - the object to serializepublic static Object deserialize(byte[] data)
data - the byte arraypublic static int compareNotNull(byte[] data1,
byte[] data2)
This method interprets bytes as unsigned.
data1 - the first byte array (must not be null)data2 - the second byte array (must not be null)Copyright © 2022. All rights reserved.