public class InlineIndexImpl extends AbstractIndex implements InlineIndex
| Constructor and Description |
|---|
InlineIndexImpl(GridCacheContext<?,?> cctx,
SortedIndexDefinition def,
InlineIndexTree[] segments,
IoStatisticsHolderIndex stats)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(CacheDataRow row)
Checks whether index handles specified cache row.
|
long |
count(int segment)
Counts index rows in specified tree segment.
|
long |
count(int segment,
IndexQueryContext qryCtx)
Counts index rows in specified tree segment with cache filter.
|
boolean |
created()
true if index is created and false if it is restored from disk. |
void |
destroy(boolean softDelete)
Destroy index.
|
GridCursor<IndexRow> |
find(IndexRow lower,
IndexRow upper,
int segment)
Finds index rows by specified range in specified tree segment.
|
GridCursor<IndexRow> |
find(IndexRow lower,
IndexRow upper,
int segment,
IndexQueryContext qryCtx)
Finds index rows by specified range in specifed tree segment with cache filtering.
|
GridCursor<IndexRow> |
findFirst(int segment,
IndexQueryContext qryCtx)
Finds first index row for specified tree segment and cache filter.
|
GridCursor<IndexRow> |
findLast(int segment,
IndexQueryContext qryCtx)
Finds last index row for specified tree segment and cache filter.
|
UUID |
id()
Unique ID.
|
int |
inlineSize() |
IndexKeyTypeSettings |
keyTypeSettings() |
String |
name()
Index name.
|
void |
onUpdate(@Nullable CacheDataRow oldRow,
@Nullable CacheDataRow newRow,
boolean prevRowAvailable)
Callback that runs when the underlying cache is updated.
|
void |
putIndexRow(IndexRowImpl row)
Put index row to index.
|
InlineIndexTree |
segment(int segment) |
int |
segmentForRow(CacheDataRow row) |
int |
segmentsCount()
Returns amount of index tree segments.
|
long |
totalCount()
Returns number of elements in the tree by scanning pages of the bottom (leaf) level.
|
<T extends Index> |
unwrap(Class<T> clazz)
Provides a standard way to access the underlying concrete index
implementation to provide access to further, proprietary features.
|
markIndexRebuild, rebuildInProgresspublic InlineIndexImpl(GridCacheContext<?,?> cctx, SortedIndexDefinition def, InlineIndexTree[] segments, IoStatisticsHolderIndex stats)
public GridCursor<IndexRow> find(IndexRow lower, IndexRow upper, int segment) throws IgniteCheckedException
find in interface SortedSegmentedIndexlower - Nullable lower bound.upper - Nullable upper bound.segment - Number of tree segment to find.IgniteCheckedExceptionpublic GridCursor<IndexRow> find(IndexRow lower, IndexRow upper, int segment, IndexQueryContext qryCtx) throws IgniteCheckedException
find in interface SortedSegmentedIndexlower - Nullable lower bound.upper - Nullable upper bound.segment - Number of tree segment to find.qryCtx - External index qyery context.IgniteCheckedExceptionpublic long count(int segment)
throws IgniteCheckedException
count in interface SortedSegmentedIndexsegment - Number of tree segment to find.IgniteCheckedExceptionpublic long count(int segment,
IndexQueryContext qryCtx)
throws IgniteCheckedException
count in interface SortedSegmentedIndexsegment - Number of tree segment to find.qryCtx - Index query context.IgniteCheckedExceptionpublic long totalCount()
throws IgniteCheckedException
totalCount in interface SortedSegmentedIndexIgniteCheckedException - If failed.public GridCursor<IndexRow> findFirst(int segment, IndexQueryContext qryCtx) throws IgniteCheckedException
findFirst in interface SortedSegmentedIndexsegment - Number of tree segment to find.qryCtx - External index qyery context.IgniteCheckedExceptionpublic GridCursor<IndexRow> findLast(int segment, IndexQueryContext qryCtx) throws IgniteCheckedException
findLast in interface SortedSegmentedIndexsegment - Number of tree segment to find.qryCtx - External index qyery context.IgniteCheckedExceptionpublic void onUpdate(@Nullable
@Nullable CacheDataRow oldRow,
@Nullable
@Nullable CacheDataRow newRow,
boolean prevRowAvailable)
throws IgniteCheckedException
onUpdate in interface IndexoldRow - Cache row that was replaced with newRow.newRow - Cache row that was stored.prevRowAvailable - Whether oldRow available.IgniteCheckedExceptionpublic void putIndexRow(IndexRowImpl row) throws IgniteCheckedException
row - Index row.IgniteCheckedExceptionpublic <T extends Index> T unwrap(Class<T> clazz)
public int inlineSize()
inlineSize in interface InlineIndexpublic IndexKeyTypeSettings keyTypeSettings()
public int segmentsCount()
segmentsCount in interface SortedSegmentedIndexpublic int segmentForRow(CacheDataRow row)
row - cache row.public boolean created()
true if index is created and false if it is restored from disk.created in interface InlineIndexpublic InlineIndexTree segment(int segment)
segment in interface InlineIndexsegment - Number of tree segment.public void destroy(boolean softDelete)
public boolean canHandle(CacheDataRow row) throws IgniteCheckedException
canHandle in interface Indexrow - Cache row.IgniteCheckedException
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021