Package org.h2.mvstore.db
Class NullValueDataType
- java.lang.Object
-
- org.h2.mvstore.db.NullValueDataType
-
-
Field Summary
Fields Modifier and Type Field Description static NullValueDataType
INSTANCE
Dummy data type instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
NullValueDataType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
binarySearch(Value key, java.lang.Object storage, int size, int initialGuess)
Perform binary search for the key within the storageint
compare(Value a, Value b)
Compare two keys.Value[]
createStorage(int size)
Create storage object of array type to hold valuesint
getMemory(Value obj)
Calculates the amount of used memory in bytes.boolean
isMemoryEstimationAllowed()
Whether memory estimation based on previously seen values is allowed/desirableValue
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.
-
-
-
Field Detail
-
INSTANCE
public static final NullValueDataType INSTANCE
Dummy data type instance.
-
-
Method Detail
-
compare
public int compare(Value a, Value b)
Description copied from interface:DataType
Compare two keys.
-
binarySearch
public int binarySearch(Value key, java.lang.Object storage, int size, int initialGuess)
Description copied from interface:DataType
Perform binary search for the key within the storage- Specified by:
binarySearch
in interfaceDataType<Value>
- Parameters:
key
- to search forstorage
- to search within (an array of type T)size
- number of data items in the storageinitialGuess
- for key position- Returns:
- index of the key , if found, - index of the insertion point, if not
-
getMemory
public int getMemory(Value obj)
Description copied from interface:DataType
Calculates the amount of used memory in bytes.
-
isMemoryEstimationAllowed
public boolean isMemoryEstimationAllowed()
Description copied from interface:DataType
Whether memory estimation based on previously seen values is allowed/desirable- Specified by:
isMemoryEstimationAllowed
in interfaceDataType<Value>
- Returns:
- true if memory estimation is allowed
-
write
public void write(WriteBuffer buff, Value obj)
Description copied from interface:DataType
Write an object.
-
write
public void write(WriteBuffer buff, java.lang.Object storage, int len)
Description copied from interface:DataType
Write a list of objects.
-
read
public Value read(java.nio.ByteBuffer buff)
Description copied from interface:DataType
Read an object.
-
read
public void read(java.nio.ByteBuffer buff, java.lang.Object storage, int len)
Description copied from interface:DataType
Read a list of objects.
-
createStorage
public Value[] createStorage(int size)
Description copied from interface:DataType
Create storage object of array type to hold values- Specified by:
createStorage
in interfaceDataType<Value>
- Parameters:
size
- number of values to hold- Returns:
- storage object
-
-