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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compare two keys.DataType<?>[]
createStorage
(int size) Create storage object of array type to hold valuesint
Calculates the amount of used memory in bytes.DataType
<?> read
(ByteBuffer buff) Read an object.void
write
(WriteBuffer buff, DataType<?> obj) Write an object.Methods inherited from class org.h2.mvstore.type.BasicDataType
binarySearch, cast, equals, hashCode, isMemoryEstimationAllowed, read, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
database
-
exceptionHandler
-
cache
-
-
Constructor Details
-
MetaType
-
-
Method Details
-
compare
Description copied from interface:DataType
Compare two keys.- Specified by:
compare
in interfaceComparator<D>
- Specified by:
compare
in interfaceDataType<D>
- Overrides:
compare
in 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:DataType
Calculates the amount of used memory in bytes. -
write
Description copied from interface:DataType
Write an object. -
read
Description copied from interface:DataType
Read an object. -
createStorage
Description copied from interface:DataType
Create storage object of array type to hold values- Parameters:
size
- number of values to hold- Returns:
- storage object
-