Package org.h2.mvstore.db
Class NullValueDataType
- java.lang.Object
-
- org.h2.mvstore.db.NullValueDataType
-
-
Field Summary
Fields Modifier and Type Field Description static NullValueDataTypeINSTANCEDummy data type instance.
-
Constructor Summary
Constructors Modifier Constructor Description privateNullValueDataType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbinarySearch(Value key, java.lang.Object storage, int size, int initialGuess)Perform binary search for the key within the storageintcompare(Value a, Value b)Compare two keys.Value[]createStorage(int size)Create storage object of array type to hold valuesintgetMemory(Value obj)Calculates the amount of used memory in bytes.booleanisMemoryEstimationAllowed()Whether memory estimation based on previously seen values is allowed/desirableValueread(java.nio.ByteBuffer buff)Read an object.voidread(java.nio.ByteBuffer buff, java.lang.Object storage, int len)Read a list of objects.voidwrite(WriteBuffer buff, java.lang.Object storage, int len)Write a list of objects.voidwrite(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:DataTypeCompare two keys.
-
binarySearch
public int binarySearch(Value key, java.lang.Object storage, int size, int initialGuess)
Description copied from interface:DataTypePerform binary search for the key within the storage- Specified by:
binarySearchin 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:DataTypeCalculates the amount of used memory in bytes.
-
isMemoryEstimationAllowed
public boolean isMemoryEstimationAllowed()
Description copied from interface:DataTypeWhether memory estimation based on previously seen values is allowed/desirable- Specified by:
isMemoryEstimationAllowedin interfaceDataType<Value>- Returns:
- true if memory estimation is allowed
-
write
public void write(WriteBuffer buff, Value obj)
Description copied from interface:DataTypeWrite an object.
-
write
public void write(WriteBuffer buff, java.lang.Object storage, int len)
Description copied from interface:DataTypeWrite a list of objects.
-
read
public Value read(java.nio.ByteBuffer buff)
Description copied from interface:DataTypeRead an object.
-
read
public void read(java.nio.ByteBuffer buff, java.lang.Object storage, int len)Description copied from interface:DataTypeRead a list of objects.
-
createStorage
public Value[] createStorage(int size)
Description copied from interface:DataTypeCreate storage object of array type to hold values- Specified by:
createStoragein interfaceDataType<Value>- Parameters:
size- number of values to hold- Returns:
- storage object
-
-