Package org.h2.mvstore.type
Class ObjectDataType.UUIDType
java.lang.Object
org.h2.mvstore.type.BasicDataType<UUID>
org.h2.mvstore.type.ObjectDataType.AutoDetectDataType<UUID>
org.h2.mvstore.type.ObjectDataType.UUIDType
- All Implemented Interfaces:
Comparator<UUID>
,DataType<UUID>
- Enclosing class:
ObjectDataType
The type for UUID objects.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ObjectDataType.UUIDType
The only instance of this type.Fields inherited from class org.h2.mvstore.type.ObjectDataType.AutoDetectDataType
typeId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compare two keys.UUID[]
createStorage
(int size) Create storage object of array type to hold valuesint
Calculates the amount of used memory in bytes.read
(ByteBuffer buff) Read an object.read
(ByteBuffer buff, int tag) Read an object from the buffer.void
write
(WriteBuffer buff, UUID a) Write an object.Methods inherited from class org.h2.mvstore.type.ObjectDataType.AutoDetectDataType
getType
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
-
INSTANCE
The only instance of this type.
-
-
Constructor Details
-
UUIDType
private UUIDType()
-
-
Method Details
-
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
-
getMemory
Description copied from interface:DataType
Calculates the amount of used memory in bytes. -
compare
Description copied from interface:DataType
Compare two keys.- Specified by:
compare
in interfaceComparator<UUID>
- Specified by:
compare
in interfaceDataType<UUID>
- Overrides:
compare
in classBasicDataType<UUID>
- Parameters:
a
- the first keyb
- the second key- Returns:
- -1 if the first key is smaller, 1 if larger, and 0 if equal
-
write
Description copied from interface:DataType
Write an object. -
read
Description copied from interface:DataType
Read an object. -
read
Description copied from class:ObjectDataType.AutoDetectDataType
Read an object from the buffer.- Specified by:
read
in classObjectDataType.AutoDetectDataType<UUID>
- Parameters:
buff
- the buffertag
- the first byte of the object (usually the type)- Returns:
- the read object
-