Package org.h2.mvstore.type
Class MetaType<D>
- Type Parameters:
D- type of opaque parameter passed as an operational context to Factory.create()
- All Implemented Interfaces:
Comparator<DataType<?>>,DataType<DataType<?>>
Class DBMetaType is a type for values in the type registry map.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompare two keys.DataType<?>[]createStorage(int size) Create storage object of array type to hold valuesintCalculates the amount of used memory in bytes.DataType<?> read(ByteBuffer buff) Read an object.voidwrite(WriteBuffer buff, DataType<?> obj) Write an object.Methods inherited from class org.h2.mvstore.type.BasicDataType
binarySearch, cast, equals, hashCode, isMemoryEstimationAllowed, read, writeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
MetaType
-
-
Method Details
-
compare
Description copied from interface:DataTypeCompare two keys.- Specified by:
comparein interfaceComparator<D>- Specified by:
comparein interfaceDataType<D>- Overrides:
comparein classBasicDataType<DataType<?>>- Parameters:
a- the first keyb- the second key- Returns:
- -1 if the first key is smaller, 1 if larger, and 0 if equal
-
getMemory
Description copied from interface:DataTypeCalculates the amount of used memory in bytes. -
write
Description copied from interface:DataTypeWrite an object. -
read
Description copied from interface:DataTypeRead an object. -
createStorage
Description copied from interface:DataTypeCreate storage object of array type to hold values- Parameters:
size- number of values to hold- Returns:
- storage object
-