public final class ValueDataType extends BasicDataType<Value> implements StatefulDataType<Database>
| Modifier and Type | Class and Description |
|---|---|
static class |
ValueDataType.Factory |
| Constructor and Description |
|---|
ValueDataType() |
ValueDataType(CastDataProvider provider,
CompareMode compareMode,
DataHandler handler,
int[] sortTypes) |
ValueDataType(Database database,
int[] sortTypes) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Value a,
Value b)
Compare two keys.
|
int |
compareValues(Value a,
Value b,
int sortType)
Compares the specified values.
|
Value[] |
createStorage(int size)
Create storage object of array type to hold values
|
boolean |
equals(java.lang.Object obj) |
ValueDataType.Factory |
getFactory() |
int |
getMemory(Value v)
Calculates the amount of used memory in bytes.
|
RowFactory |
getRowFactory() |
int |
hashCode() |
Value |
read(java.nio.ByteBuffer buff)
Read an object.
|
void |
save(WriteBuffer buff,
MetaType<Database> metaType)
Save the state.
|
void |
setRowFactory(RowFactory rowFactory) |
void |
write(WriteBuffer buff,
Value v)
Write an object.
|
static void |
writeLong(WriteBuffer buff,
long x)
Writes a long.
|
binarySearch, cast, isMemoryEstimationAllowed, read, writepublic ValueDataType()
public ValueDataType(Database database, int[] sortTypes)
public ValueDataType(CastDataProvider provider, CompareMode compareMode, DataHandler handler, int[] sortTypes)
public RowFactory getRowFactory()
public void setRowFactory(RowFactory rowFactory)
public Value[] createStorage(int size)
DataTypecreateStorage in interface DataType<Value>size - number of values to holdpublic int compare(Value a, Value b)
DataTypepublic int compareValues(Value a, Value b, int sortType)
a - the first valueb - the second valuesortType - the sorting typepublic int getMemory(Value v)
DataTypepublic Value read(java.nio.ByteBuffer buff)
DataTypepublic void write(WriteBuffer buff, Value v)
DataTypepublic static void writeLong(WriteBuffer buff, long x)
buff - the target bufferx - the long valuepublic boolean equals(java.lang.Object obj)
equals in interface java.util.Comparator<Value>equals in class BasicDataType<Value>public int hashCode()
hashCode in class BasicDataType<Value>public void save(WriteBuffer buff, MetaType<Database> metaType)
StatefulDataTypesave in interface StatefulDataType<Database>buff - the target buffermetaType - the meta typepublic ValueDataType.Factory getFactory()
getFactory in interface StatefulDataType<Database>