| 限定符和类型 | 字段和说明 |
|---|---|
static NullValueDataType |
INSTANCE
Dummy data type instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
binarySearch(Value key,
Object storage,
int size,
int initialGuess)
Perform binary search for the key within the storage
|
int |
compare(Value a,
Value b)
Compare two keys.
|
Value[] |
createStorage(int size)
Create storage object of array type to hold values
|
int |
getMemory(Value obj)
Calculates the amount of used memory in bytes.
|
boolean |
isMemoryEstimationAllowed()
Whether memory estimation based on previously seen values is allowed/desirable
|
Value |
read(ByteBuffer buff)
Read an object.
|
void |
read(ByteBuffer buff,
Object storage,
int len)
Read a list of objects.
|
void |
write(WriteBuffer buff,
Object storage,
int len)
Write a list of objects.
|
void |
write(WriteBuffer buff,
Value obj)
Write an object.
|
public static final NullValueDataType INSTANCE
public int binarySearch(Value key, Object storage, int size, int initialGuess)
DataTypebinarySearch 在接口中 DataType<Value>key - to search forstorage - to search within (an array of type T)size - number of data items in the storageinitialGuess - for key positionpublic int getMemory(Value obj)
DataTypepublic boolean isMemoryEstimationAllowed()
DataTypeisMemoryEstimationAllowed 在接口中 DataType<Value>public void write(WriteBuffer buff, Value obj)
DataTypepublic void write(WriteBuffer buff, Object storage, int len)
DataTypepublic Value read(ByteBuffer buff)
DataTypepublic void read(ByteBuffer buff, Object storage, int len)
DataTypepublic Value[] createStorage(int size)
DataTypecreateStorage 在接口中 DataType<Value>size - number of values to holdCopyright © 2022. All rights reserved.