Class NullValueDataType
java.lang.Object
org.h2.mvstore.db.NullValueDataType
- All Implemented Interfaces:
Comparator<Value>, DataType<Value>
-
Field Summary
Fields -
Constructor Summary
Constructors -
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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
INSTANCE
Dummy data type instance.
-
-
Constructor Details
-
NullValueDataType
private NullValueDataType()
-
-
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
-
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
-
write
-
read
-
read
-
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
-