Package org.h2.mvstore.db
Class NullValueDataType
java.lang.Object
org.h2.mvstore.db.NullValueDataType
- All Implemented Interfaces:
Comparator<Value>,DataType<Value>
Dummy data type used when no value is required. This data type doesn't use
any disk space and always returns SQL NULL value.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintbinarySearch(Value key, Object storage, int size, int initialGuess) Perform binary search for the key within the storageintCompare two keys.Value[]createStorage(int size) Create storage object of array type to hold valuesintCalculates the amount of used memory in bytes.booleanWhether memory estimation based on previously seen values is allowed/desirableread(ByteBuffer buff) Read an object.voidread(ByteBuffer buff, Object storage, int len) Read a list of objects.voidwrite(WriteBuffer buff, Object storage, int len) Write a list of objects.voidwrite(WriteBuffer buff, Value obj) Write an object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
INSTANCE
Dummy data type instance.
-
-
Method Details
-
compare
Description copied from interface:DataTypeCompare two keys. -
binarySearch
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
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
Description copied from interface:DataTypeWrite an object. -
write
Description copied from interface:DataTypeWrite a list of objects. -
read
Description copied from interface:DataTypeRead an object. -
read
Description copied from interface:DataTypeRead a list of objects. -
createStorage
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
-