public class H2TreeIndex extends H2TreeIndexBase
BPlusTree.| Modifier and Type | Class and Description |
|---|---|
static interface |
H2TreeIndex.H2TreeFactory
Interface for
H2Tree factory class. |
| Modifier and Type | Field and Description |
|---|---|
static H2TreeIndex.H2TreeFactory |
h2TreeFactory
Override it for test purposes.
|
| Modifier and Type | Method and Description |
|---|---|
H2TreeIndex |
createCopy(PageMemory pageMem,
IgniteCacheOffheapManager offheap)
Creates a new index that is an exact copy of this index.
|
static H2TreeIndex |
createIndex(GridCacheContext<?,?> cctx,
@Nullable H2RowCache rowCache,
GridH2Table tbl,
String idxName,
boolean pk,
boolean affinityKey,
List<org.gridgain.internal.h2.table.IndexColumn> unwrappedCols,
List<org.gridgain.internal.h2.table.IndexColumn> wrappedCols,
int inlineSize,
int segmentsCnt,
IgniteLogger log) |
static H2TreeIndex |
createIndex(GridCacheContext<?,?> cctx,
@Nullable H2RowCache rowCache,
GridH2Table tbl,
String idxName,
boolean pk,
boolean affinityKey,
List<org.gridgain.internal.h2.table.IndexColumn> unwrappedCols,
List<org.gridgain.internal.h2.table.IndexColumn> wrappedCols,
int inlineSize,
int segmentsCnt,
PageMemory pageMemory,
IgniteCacheOffheapManager offheap,
PageIoResolver pageIoRslvr,
IgniteLogger log) |
org.gridgain.internal.h2.index.IndexLookupBatch |
createLookupBatch(org.gridgain.internal.h2.table.TableFilter[] filters,
int filter) |
void |
destroy(boolean rmvIdx)
Internal method for destroying index.
|
void |
destroy0(boolean rmvIdx,
boolean renameImmediately)
Internal method for destroying index.
|
org.gridgain.internal.h2.index.Cursor |
find(org.gridgain.internal.h2.engine.Session ses,
org.gridgain.internal.h2.result.SearchRow lower,
org.gridgain.internal.h2.result.SearchRow upper) |
org.gridgain.internal.h2.index.Cursor |
findFirstOrLast(org.gridgain.internal.h2.engine.Session ses,
boolean b) |
Iterator<H2Row> |
findForSegment(GridH2RowRangeBounds bounds,
int segment,
BPlusTree.TreeRowClosure<H2Row,H2Row> filter)
Find rows for the segments (distributed joins).
|
String |
getIndexName()
Returns index name.
|
long |
getRowCount(org.gridgain.internal.h2.engine.Session ses) |
int |
inlineSize() |
void |
markRenamed()
Marks index as renamed, meaning on destruction there is no need to
run
DurableBackgroundCleanupIndexTreeTaskV2. |
H2CacheRow |
put(H2CacheRow row)
Puts row.
|
boolean |
putx(H2CacheRow row)
Puts row.
|
boolean |
rebuildRequired()
Check if index exists in store.
|
boolean |
removex(org.gridgain.internal.h2.result.SearchRow row)
Removes row from index.
|
int |
segmentsCount() |
void |
send(Collection<ClusterNode> nodes,
Message msg) |
long |
size()
Returns number of elements in the tree by scanning pages of the bottom (leaf) level.
|
GridH2RowMessage |
toSearchRowMessage(org.gridgain.internal.h2.result.SearchRow row) |
long |
totalRowCount(IndexingQueryCacheFilter partsFilter) |
H2Tree |
treeForRead(int segment) |
String |
treeName()
Returns the tree name of this index.
|
canGetFirstOrLast, getCostadd, calculateSegment, checkRename, close, columnsArray, getDiskSpaceUsed, getDistributedMultiplier, getRowCountApproximation, getTable, needRebuild, queryContextRegistry, refreshColumnIds, remove, remove, removeChildrenAndResources, rowDescriptor, segment, segmentForPartition, segmentForRow, truncatecostRangeIndex, getCostRangeIndex_8_7_12canFindNext, canScan, checkIndexColumnTypes, compareRows, find, findNext, getColumnIndex, getColumns, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDropSQL, getDuplicateKeyException, getIndexColumns, getIndexType, getPlanSQL, getRow, getType, isFindUsingFullTableScan, isFirstColumn, isHidden, isRowIdIndex, mayHaveNullDuplicates, setSortedInsertMode, updategetSchema, getSQL, getSQLgetChildren, getComment, getDatabase, getId, getModificationId, getName, invalidate, isTemporary, isValid, rename, setComment, setModified, setObjectName, setTemporary, toStringpublic static H2TreeIndex.H2TreeFactory h2TreeFactory
public static H2TreeIndex createIndex(GridCacheContext<?,?> cctx, @Nullable @Nullable H2RowCache rowCache, GridH2Table tbl, String idxName, boolean pk, boolean affinityKey, List<org.gridgain.internal.h2.table.IndexColumn> unwrappedCols, List<org.gridgain.internal.h2.table.IndexColumn> wrappedCols, int inlineSize, int segmentsCnt, IgniteLogger log) throws IgniteCheckedException
cctx - Cache context.rowCache - Row cache.tbl - Table.idxName - Index name.pk - Primary key.affinityKey - true for affinity key.unwrappedCols - Unwrapped index columns for complex types.wrappedCols - Index columns as is.inlineSize - Inline size.segmentsCnt - Count of tree segments.log - Logger.IgniteCheckedException - If failed.public static H2TreeIndex createIndex(GridCacheContext<?,?> cctx, @Nullable @Nullable H2RowCache rowCache, GridH2Table tbl, String idxName, boolean pk, boolean affinityKey, List<org.gridgain.internal.h2.table.IndexColumn> unwrappedCols, List<org.gridgain.internal.h2.table.IndexColumn> wrappedCols, int inlineSize, int segmentsCnt, PageMemory pageMemory, IgniteCacheOffheapManager offheap, PageIoResolver pageIoRslvr, IgniteLogger log) throws IgniteCheckedException
IgniteCheckedExceptionpublic int inlineSize()
inlineSize in class H2TreeIndexBasepublic boolean rebuildRequired()
True if exists.public int segmentsCount()
segmentsCount in class GridH2IndexBasepublic org.gridgain.internal.h2.index.Cursor find(org.gridgain.internal.h2.engine.Session ses,
org.gridgain.internal.h2.result.SearchRow lower,
org.gridgain.internal.h2.result.SearchRow upper)
public H2CacheRow put(H2CacheRow row)
put in class GridH2IndexBaserow - Row.null.public boolean putx(H2CacheRow row)
putx in class GridH2IndexBaserow - Row.True if existing row row has been replaced.public boolean removex(org.gridgain.internal.h2.result.SearchRow row)
removex in class GridH2IndexBaserow - Row.True if row has been removed.public long getRowCount(org.gridgain.internal.h2.engine.Session ses)
public org.gridgain.internal.h2.index.Cursor findFirstOrLast(org.gridgain.internal.h2.engine.Session ses,
boolean b)
public void destroy(boolean rmvIdx)
H2TreeIndex destroy operation is asynchronous.destroy in class GridH2IndexBasermvIdx - Flag remove.public void markRenamed()
DurableBackgroundCleanupIndexTreeTaskV2.public void destroy0(boolean rmvIdx,
boolean renameImmediately)
throws IgniteCheckedException
H2TreeIndex destroy operation is asynchronous.rmvIdx - Flag remove.renameImmediately - Use true to rename index tree immediately, before executing cleanup task.IgniteCheckedExceptionpublic H2Tree treeForRead(int segment)
segment - Segment Id.public long totalRowCount(IndexingQueryCacheFilter partsFilter)
totalRowCount in class GridH2IndexBasepartsFilter - Partitions filter.public org.gridgain.internal.h2.index.IndexLookupBatch createLookupBatch(org.gridgain.internal.h2.table.TableFilter[] filters,
int filter)
createLookupBatch in interface org.gridgain.internal.h2.index.IndexcreateLookupBatch in class org.gridgain.internal.h2.index.BaseIndexpublic void send(Collection<ClusterNode> nodes, Message msg)
nodes - Nodes.msg - Message.public Iterator<H2Row> findForSegment(GridH2RowRangeBounds bounds, int segment, BPlusTree.TreeRowClosure<H2Row,H2Row> filter)
bounds - Bounds.segment - Segment.filter - Filter.public GridH2RowMessage toSearchRowMessage(org.gridgain.internal.h2.result.SearchRow row)
row - Search row.public long size()
throws IgniteCheckedException
IgniteCheckedException - If failed.public String treeName()
public H2TreeIndex createCopy(PageMemory pageMem, IgniteCacheOffheapManager offheap) throws IgniteCheckedException
pageMem - Page memory.offheap - Offheap manager.IgniteCheckedExceptionpublic String getIndexName()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.9.23-p1 Release Date : November 19 2025