public final class RowDataType extends BasicDataType<SearchRow> implements StatefulDataType<Database>
| Modifier and Type | Class and Description |
|---|---|
static class |
RowDataType.Factory |
| Constructor and Description |
|---|
RowDataType(CastDataProvider provider,
CompareMode compareMode,
DataHandler handler,
int[] sortTypes,
int[] indexes,
int columnCount,
boolean storeKeys) |
| Modifier and Type | Method and Description |
|---|---|
int |
binarySearch(SearchRow key,
java.lang.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(java.lang.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(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,
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 in interface DataType<SearchRow>capacity - number of values to holdpublic int compare(SearchRow a, SearchRow b)
DataTypepublic int binarySearch(SearchRow key, java.lang.Object storage, int size, int initialGuess)
DataTypebinarySearch in interface DataType<SearchRow>binarySearch in class 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(java.nio.ByteBuffer buff)
DataTypepublic void write(WriteBuffer buff, SearchRow row)
DataTypepublic boolean equals(java.lang.Object obj)
equals in interface java.util.Comparator<SearchRow>equals in class BasicDataType<SearchRow>public int hashCode()
hashCode in class BasicDataType<SearchRow>public void save(WriteBuffer buff, MetaType<Database> metaType)
StatefulDataTypesave in interface StatefulDataType<Database>buff - the target buffermetaType - the meta typepublic RowDataType.Factory getFactory()
getFactory in interface StatefulDataType<Database>