| Modifier and Type | Field and Description |
|---|---|
static NullValueDataType |
INSTANCE
Dummy data type instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
binarySearch(Value key,
java.lang.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(java.nio.ByteBuffer buff)
Read an object.
|
void |
read(java.nio.ByteBuffer buff,
java.lang.Object storage,
int len)
Read a list of objects.
|
void |
write(WriteBuffer buff,
java.lang.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 compare(Value a, Value b)
DataTypepublic int binarySearch(Value key, java.lang.Object storage, int size, int initialGuess)
DataTypebinarySearch in interface 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 in interface DataType<Value>public void write(WriteBuffer buff, Value obj)
DataTypepublic void write(WriteBuffer buff, java.lang.Object storage, int len)
DataTypepublic Value read(java.nio.ByteBuffer buff)
DataTypepublic void read(java.nio.ByteBuffer buff,
java.lang.Object storage,
int len)
DataTypepublic Value[] createStorage(int size)
DataTypecreateStorage in interface DataType<Value>size - number of values to hold