public class InlineIndexHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<Integer> |
AVAILABLE_TYPES |
static int |
CANT_BE_COMPARE
Value for comparison meaning 'Not enough information to compare'.
|
| Constructor and Description |
|---|
InlineIndexHelper(String colName,
int type,
int colIdx,
int sortType,
CompareMode compareMode) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canRelyOnCompare(int c,
Value shortVal,
Value v2) |
static void |
clearCurrentInlineIndexes()
Clears current context.
|
String |
colName() |
int |
columnIndex() |
int |
compare(long pageAddr,
int off,
int maxSize,
Value v,
Comparator<Value> comp) |
static int |
fixSort(int c,
int sortType)
Perform sort order correction.
|
int |
fullSize(long pageAddr,
int off) |
Value |
get(long pageAddr,
int off,
int maxSize) |
static List<InlineIndexHelper> |
getCurrentInlineIndexes() |
int |
inlineSizeOf(Value val)
Calculate size to inline given value.
|
protected boolean |
isValueFull(long pageAddr,
int off) |
static String |
nameTypeBycode(int typeCode) |
int |
put(long pageAddr,
int off,
Value val,
int maxSize) |
static void |
setCurrentInlineIndexes(List<InlineIndexHelper> inlineIdxs)
Sets page context for current thread.
|
short |
size() |
int |
sortType() |
static byte[] |
trimUTF8(byte[] bytes,
int limit)
Convert String to byte[] with size limit, according to UTF-8 encoding.
|
int |
type() |
public static final int CANT_BE_COMPARE
public InlineIndexHelper(String colName, int type, int colIdx, int sortType, CompareMode compareMode)
colName - Column name.type - Index type (see Value).colIdx - Index column index.sortType - Column sort type (see IndexColumn#sortType).compareMode - Compare mode.public String colName()
public int type()
public int columnIndex()
public int sortType()
public static List<InlineIndexHelper> getCurrentInlineIndexes()
public static void setCurrentInlineIndexes(List<InlineIndexHelper> inlineIdxs)
public static void clearCurrentInlineIndexes()
public short size()
public int fullSize(long pageAddr,
int off)
pageAddr - Page address.off - Offset.public Value get(long pageAddr,
int off,
int maxSize)
pageAddr - Page address.off - Offset.protected boolean isValueFull(long pageAddr,
int off)
pageAddr - Page address.off - Offset.True if string is not truncated on save.public int compare(long pageAddr,
int off,
int maxSize,
Value v,
Comparator<Value> comp)
pageAddr - Page address.off - Offset.maxSize - Maximum size to read.v - Value to compare.comp - Comparator.CANT_BE_COMPARE means we can't compare).public int inlineSizeOf(Value val)
val - Value to calculate inline size.public int put(long pageAddr,
int off,
Value val,
int maxSize)
pageAddr - Page address.off - Offset.val - Value.public static byte[] trimUTF8(byte[] bytes,
int limit)
bytes - byte[].limit - Size limit.protected boolean canRelyOnCompare(int c,
Value shortVal,
Value v2)
c - Compare result.shortVal - Short value.v2 - Second value;true if we can rely on compare result.public static int fixSort(int c,
int sortType)
c - Compare result.sortType - Sort type.public static String nameTypeBycode(int typeCode)
typeCode - Type code.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2-p3 Release Date : April 25 2019