Package org.h2.mvstore.type
Class MetaType<D>
- java.lang.Object
-
- org.h2.mvstore.type.BasicDataType<DataType<?>>
-
- org.h2.mvstore.type.MetaType<D>
-
- Type Parameters:
D
- type of opaque parameter passed as an operational context to Factory.create()
public final class MetaType<D> extends BasicDataType<DataType<?>>
Class DBMetaType is a type for values in the type registry map.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Object>
cache
private D
database
private java.lang.Thread.UncaughtExceptionHandler
exceptionHandler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(DataType<?> a, DataType<?> b)
Compare two keys.DataType<?>[]
createStorage(int size)
Create storage object of array type to hold valuesint
getMemory(DataType<?> obj)
Calculates the amount of used memory in bytes.DataType<?>
read(java.nio.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
-
-
-
-
Field Detail
-
database
private final D database
-
exceptionHandler
private final java.lang.Thread.UncaughtExceptionHandler exceptionHandler
-
cache
private final java.util.Map<java.lang.String,java.lang.Object> cache
-
-
Constructor Detail
-
MetaType
public MetaType(D database, java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
-
-
Method Detail
-
compare
public int compare(DataType<?> a, DataType<?> b)
Description copied from interface:DataType
Compare two keys.
-
getMemory
public int getMemory(DataType<?> obj)
Description copied from interface:DataType
Calculates the amount of used memory in bytes.
-
write
public void write(WriteBuffer buff, DataType<?> obj)
Description copied from interface:DataType
Write an object.
-
read
public DataType<?> read(java.nio.ByteBuffer buff)
Description copied from interface:DataType
Read an object.
-
-