public final class RowDataType extends BasicDataType<SearchRow> implements StatefulDataType<Database>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
RowDataType.Factory |
| 构造器和说明 |
|---|
RowDataType(CastDataProvider provider,
CompareMode compareMode,
DataHandler handler,
int[] sortTypes,
int[] indexes,
int columnCount,
boolean storeKeys) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
binarySearch(SearchRow key,
Object storage,
int size,
int initialGuess)
Perform binary search for the key within the storage
|
int |
binarySearch(SearchRow key,
SearchRow[] keys,
int size,
int initialGuess) |
int |
compare(SearchRow a,
SearchRow b)
Compare two keys.
|
SearchRow[] |
createStorage(int capacity)
Create storage object of array type to hold values
|
boolean |
equals(Object obj) |
int |
getColumnCount() |
RowDataType.Factory |
getFactory() |
int[] |
getIndexes() |
int |
getMemory(SearchRow row)
Calculates the amount of used memory in bytes.
|
RowFactory |
getRowFactory() |
int |
hashCode() |
boolean |
isStoreKeys() |
SearchRow |
read(ByteBuffer buff)
Read an object.
|
void |
save(WriteBuffer buff,
MetaType<Database> metaType)
Save the state.
|
void |
setRowFactory(RowFactory rowFactory) |
void |
write(WriteBuffer buff,
SearchRow row)
Write an object.
|
cast, isMemoryEstimationAllowed, read, writepublic RowDataType(CastDataProvider provider, CompareMode compareMode, DataHandler handler, int[] sortTypes, int[] indexes, int columnCount, boolean storeKeys)
public int[] getIndexes()
public RowFactory getRowFactory()
public void setRowFactory(RowFactory rowFactory)
public int getColumnCount()
public boolean isStoreKeys()
public SearchRow[] createStorage(int capacity)
DataTypecreateStorage 在接口中 DataType<SearchRow>capacity - number of values to holdpublic int compare(SearchRow a, SearchRow b)
DataTypecompare 在接口中 Comparator<SearchRow>compare 在接口中 DataType<SearchRow>compare 在类中 BasicDataType<SearchRow>a - the first keyb - the second keypublic int binarySearch(SearchRow key, Object storage, int size, int initialGuess)
DataTypebinarySearch 在接口中 DataType<SearchRow>binarySearch 在类中 BasicDataType<SearchRow>key - to search forstorage - to search within (an array of type T)size - number of data items in the storageinitialGuess - for key positionpublic int getMemory(SearchRow row)
DataTypepublic SearchRow read(ByteBuffer buff)
DataTypepublic void write(WriteBuffer buff, SearchRow row)
DataTypepublic boolean equals(Object obj)
equals 在接口中 Comparator<SearchRow>equals 在类中 BasicDataType<SearchRow>public int hashCode()
hashCode 在类中 BasicDataType<SearchRow>public void save(WriteBuffer buff, MetaType<Database> metaType)
StatefulDataTypesave 在接口中 StatefulDataType<Database>buff - the target buffermetaType - the meta typepublic RowDataType.Factory getFactory()
getFactory 在接口中 StatefulDataType<Database>Copyright © 2022. All rights reserved.