public final class ValueDataType extends BasicDataType<Value> implements StatefulDataType<Database>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ValueDataType.Factory |
| 构造器和说明 |
|---|
ValueDataType() |
ValueDataType(CastDataProvider provider,
CompareMode compareMode,
DataHandler handler,
int[] sortTypes) |
ValueDataType(Database database,
int[] sortTypes) |
| 限定符和类型 | 方法和说明 |
|---|---|
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(Object obj) |
ValueDataType.Factory |
getFactory() |
int |
getMemory(Value v)
Calculates the amount of used memory in bytes.
|
RowFactory |
getRowFactory() |
int |
hashCode() |
Value |
read(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 在接口中 DataType<Value>size - number of values to holdpublic int compare(Value a, Value b)
DataTypecompare 在接口中 Comparator<Value>compare 在接口中 DataType<Value>compare 在类中 BasicDataType<Value>a - the first keyb - the second keypublic 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(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(Object obj)
equals 在接口中 Comparator<Value>equals 在类中 BasicDataType<Value>public int hashCode()
hashCode 在类中 BasicDataType<Value>public void save(WriteBuffer buff, MetaType<Database> metaType)
StatefulDataTypesave 在接口中 StatefulDataType<Database>buff - the target buffermetaType - the meta typepublic ValueDataType.Factory getFactory()
getFactory 在接口中 StatefulDataType<Database>Copyright © 2022. All rights reserved.