public abstract class NullableInlineIndexKeyType<T extends IndexKey> extends Object implements InlineIndexKeyType
| Modifier and Type | Field and Description |
|---|---|
static int |
CANT_BE_COMPARE
Value for comparison meaning 'Not enough information to compare'.
|
static int |
COMPARE_UNSUPPORTED
Value for comparison meaning 'Compare not supported for given value'.
|
protected short |
keySize
Actual size of a key without type field.
|
| Modifier | Constructor and Description |
|---|---|
protected |
NullableInlineIndexKeyType(int type,
short keySize) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(long pageAddr,
int off,
int maxSize,
IndexKey key)
Compares inlined and given value.
|
abstract int |
compare0(long pageAddr,
int off,
T v)
Compares inlined and given value.
|
IndexKey |
get(long pageAddr,
int off,
int maxSize)
Restores value from inline, if possible.
|
protected abstract T |
get0(long pageAddr,
int off)
Restores value from inline.
|
int |
inlineSize()
Returns size of inlined key.
|
int |
inlineSize(IndexKey key)
Returns inline size for specified key.
|
int |
inlineSize(long pageAddr,
int off)
Actual size of inline value.
|
protected abstract int |
inlineSize0(T key)
Return inlined size for specified key.
|
int |
put(long pageAddr,
int off,
IndexKey key,
int maxSize)
Puts given value into inline index tree.
|
protected abstract int |
put0(long pageAddr,
int off,
T val,
int maxSize)
Puts given value into inline index tree.
|
protected byte[] |
readBytes(long pageAddr,
int off)
Read variable length bytearray
|
int |
type()
Returns type of inlined column.
|
public static final int CANT_BE_COMPARE
public static final int COMPARE_UNSUPPORTED
protected final short keySize
protected NullableInlineIndexKeyType(int type,
short keySize)
type - Index key type.keySize - Size of value stored in the key.public int type()
type in interface InlineIndexKeyTypepublic int inlineSize(long pageAddr,
int off)
inlineSize in interface InlineIndexKeyTypepageAddr - Page address.off - Offset.public int inlineSize()
inlineSize in interface InlineIndexKeyTypepublic int inlineSize(IndexKey key)
inlineSize in interface InlineIndexKeyTypepublic IndexKey get(long pageAddr, int off, int maxSize)
get in interface InlineIndexKeyTypepageAddr - Address of the page.off - Offset on the page.maxSize - Max size to read.null if value can't be restored.public int put(long pageAddr,
int off,
IndexKey key,
int maxSize)
put in interface InlineIndexKeyTypepageAddr - Page address.off - Offset.key - Index key.maxSize - Max size.protected abstract int put0(long pageAddr,
int off,
T val,
int maxSize)
pageAddr - Page address.off - Offset.val - Value.maxSize - Max size.@Nullable protected abstract T get0(long pageAddr, int off)
pageAddr - Page address.off - Offset.null if value can't be restored.protected byte[] readBytes(long pageAddr,
int off)
public int compare(long pageAddr,
int off,
int maxSize,
IndexKey key)
compare in interface InlineIndexKeyTypepageAddr - Page address.off - Offset.maxSize - Max size.key - Value that should be compare.public abstract int compare0(long pageAddr,
int off,
T v)
pageAddr - Page address.off - Offset.v - Value that should be compare.CANT_BE_COMPARE if inlined part
is not enough to compare, or COMPARE_UNSUPPORTED if given value
can't be compared with inlined part at all.protected abstract int inlineSize0(T key)
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021