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.
|
static int |
VARTYPE_HEADER_SIZE
Size of header for vartypes inlined values.
|
| Modifier | Constructor and Description |
|---|---|
protected |
NullableInlineIndexKeyType(IndexKeyType 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,
IndexKey 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.
|
boolean |
inlinedFullValue(long pageAddr,
int off,
int maxSize)
Whether inline contains full index key.
|
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.
|
Boolean |
isNull(long pageAddr,
int off,
int maxSize)
Checks if inlined index key is null.
|
short |
keySize() |
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.
|
static byte[] |
readBytes(long pageAddr,
int off)
Read variable length bytearray
|
IndexKeyType |
type()
Returns type of inlined column.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisComparableTopublic static final int CANT_BE_COMPARE
public static final int COMPARE_UNSUPPORTED
public static final int VARTYPE_HEADER_SIZE
protected final short keySize
protected NullableInlineIndexKeyType(IndexKeyType type, short keySize)
type - Index key type.keySize - Size of value stored in the key.public IndexKeyType 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 Boolean isNull(long pageAddr, int off, int maxSize)
isNull in interface InlineIndexKeyTypepageAddr - Page address.off - Offset.maxSize - Remaining inlined buffer size (max available bytes to read for the current row).Boolean.TRUE if index key is null, Boolean.FALSE if index key is not null,
null if can't say for sure.public int put(long pageAddr,
int off,
IndexKey key,
int maxSize)
put in interface InlineIndexKeyTypepageAddr - Page address.off - Offset.key - Index key.maxSize - Remaining inlined buffer size (max available bytes to write for the current row).public short keySize()
keySize in interface InlineIndexKeyType-1 means variable length of key.protected abstract int put0(long pageAddr,
int off,
T val,
int maxSize)
pageAddr - Page address.off - Offset.val - Value.maxSize - Max size.protected abstract T get0(long pageAddr, int off)
pageAddr - Page address.off - Offset.public static 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 - Remaining inlined buffer size (max available bytes to read for the current row).key - Value that should be compare.public abstract int compare0(long pageAddr,
int off,
IndexKey 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)
public boolean inlinedFullValue(long pageAddr,
int off,
int maxSize)
inlinedFullValue in interface InlineIndexKeyTypepageAddr - Page address.off - Offset.maxSize - Remaining inlined buffer size (max available bytes to read for the current row).true if inline contains full index key. Can be false for truncated variable length types.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023