public abstract class GridMergeIndex
extends org.h2.index.BaseIndex
| Modifier and Type | Class and Description |
|---|---|
protected class |
GridMergeIndex.FetchingCursor
Fetching cursor.
|
protected static interface |
GridMergeIndex.Pollable<E>
Pollable.
|
| Modifier and Type | Field and Description |
|---|---|
protected Comparator<org.h2.result.SearchRow> |
firstRowCmp |
protected Comparator<org.h2.result.SearchRow> |
lastRowCmp |
| Modifier | Constructor and Description |
|---|---|
protected |
GridMergeIndex(GridKernalContext ctx) |
|
GridMergeIndex(GridKernalContext ctx,
GridMergeTable tbl,
String name,
org.h2.index.IndexType type,
org.h2.table.IndexColumn[] cols) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.h2.engine.Session ses,
org.h2.result.Row row) |
void |
addPage(GridResultPage page) |
protected abstract void |
addPage0(GridResultPage page) |
protected static int |
binarySearchRow(List<org.h2.result.Row> rows,
org.h2.result.SearchRow searchRow,
Comparator<org.h2.result.SearchRow> cmp,
boolean checkLast) |
boolean |
canGetFirstOrLast() |
protected void |
checkBounds(org.h2.result.Row lastEvictedRow,
org.h2.result.SearchRow first,
org.h2.result.SearchRow last) |
void |
checkRename() |
void |
close(org.h2.engine.Session ses) |
protected GridResultPage |
createDummyLastPage(GridResultPage lastPage) |
void |
fail(javax.cache.CacheException e) |
void |
fail(UUID nodeId,
javax.cache.CacheException e) |
abstract boolean |
fetchedAll() |
org.h2.index.Cursor |
find(org.h2.engine.Session ses,
org.h2.result.SearchRow first,
org.h2.result.SearchRow last) |
protected abstract org.h2.index.Cursor |
findAllFetched(List<org.h2.result.Row> fetched,
org.h2.result.SearchRow first,
org.h2.result.SearchRow last) |
org.h2.index.Cursor |
findFirstOrLast(org.h2.engine.Session ses,
boolean first) |
protected abstract org.h2.index.Cursor |
findInStream(org.h2.result.SearchRow first,
org.h2.result.SearchRow last) |
long |
getDiskSpaceUsed() |
long |
getRowCount(org.h2.engine.Session ses) |
long |
getRowCountApproximation() |
boolean |
hasSource(UUID nodeId) |
boolean |
needRebuild() |
protected Iterator<org.h2.value.Value[]> |
pollNextIterator(GridMergeIndex.Pollable<GridResultPage> queue,
Iterator<org.h2.value.Value[]> iter) |
void |
remove(org.h2.engine.Session ses) |
void |
remove(org.h2.engine.Session ses,
org.h2.result.Row row) |
void |
setPageSize(int pageSize) |
void |
setSources(Collection<ClusterNode> nodes,
int segmentsCnt)
Set source nodes.
|
Set<UUID> |
sources() |
void |
truncate(org.h2.engine.Session ses) |
canFindNext, canScan, checkIndexColumnTypes, commit, compareRows, containsNullAndAllowMultipleNull, createLookupBatch, find, findNext, getColumnIndex, getColumns, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDropSQL, getDuplicateKeyException, getIndexColumns, getIndexType, getPlanSQL, getRow, getTable, getType, initBaseIndex, isFirstColumn, isHidden, isRowIdIndex, removeChildrenAndResources, setSortedInsertModegetChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, rename, setComment, setModified, setObjectName, setTemporary, toStringprotected final Comparator<org.h2.result.SearchRow> firstRowCmp
protected final Comparator<org.h2.result.SearchRow> lastRowCmp
public GridMergeIndex(GridKernalContext ctx, GridMergeTable tbl, String name, org.h2.index.IndexType type, org.h2.table.IndexColumn[] cols)
ctx - Context.tbl - Table.name - Index name.type - Type.cols - Columns.protected GridMergeIndex(GridKernalContext ctx)
ctx - Context.public boolean hasSource(UUID nodeId)
nodeId - Node ID.true If this index needs data from the given source node.public long getRowCount(org.h2.engine.Session ses)
public long getRowCountApproximation()
public void setSources(Collection<ClusterNode> nodes, int segmentsCnt)
nodes - Nodes.segmentsCnt - Index segments per table.public void setPageSize(int pageSize)
pageSize - Page size.protected final Iterator<org.h2.value.Value[]> pollNextIterator(GridMergeIndex.Pollable<GridResultPage> queue, Iterator<org.h2.value.Value[]> iter)
queue - Queue to poll.iter - Current iterator.public void fail(javax.cache.CacheException e)
e - Error.public void fail(UUID nodeId, javax.cache.CacheException e)
nodeId - Node ID.e - Exception.public final void addPage(GridResultPage page)
page - Page.protected final GridResultPage createDummyLastPage(GridResultPage lastPage)
lastPage - Real last page.protected abstract void addPage0(GridResultPage page)
page - Page.public final org.h2.index.Cursor find(org.h2.engine.Session ses,
org.h2.result.SearchRow first,
org.h2.result.SearchRow last)
public abstract boolean fetchedAll()
true If we have fetched all the remote rows into a fetched list.protected void checkBounds(org.h2.result.Row lastEvictedRow,
org.h2.result.SearchRow first,
org.h2.result.SearchRow last)
lastEvictedRow - Last evicted fetched row.first - Lower bound.last - Upper bound.protected abstract org.h2.index.Cursor findInStream(@Nullable
org.h2.result.SearchRow first,
@Nullable
org.h2.result.SearchRow last)
first - Lower bound.last - Upper bound.GridMergeIndex.FetchingCursor instance.protected abstract org.h2.index.Cursor findAllFetched(List<org.h2.result.Row> fetched, @Nullable org.h2.result.SearchRow first, @Nullable org.h2.result.SearchRow last)
fetched - Fetched rows.first - Lower bound.last - Upper bound.public void checkRename()
checkRename in interface org.h2.engine.DbObjectcheckRename in class org.h2.engine.DbObjectBasepublic void close(org.h2.engine.Session ses)
public void add(org.h2.engine.Session ses,
org.h2.result.Row row)
public void remove(org.h2.engine.Session ses,
org.h2.result.Row row)
public void remove(org.h2.engine.Session ses)
public void truncate(org.h2.engine.Session ses)
public boolean canGetFirstOrLast()
public org.h2.index.Cursor findFirstOrLast(org.h2.engine.Session ses,
boolean first)
public boolean needRebuild()
public long getDiskSpaceUsed()
protected static int binarySearchRow(List<org.h2.result.Row> rows, org.h2.result.SearchRow searchRow, Comparator<org.h2.result.SearchRow> cmp, boolean checkLast)
rows - Sorted rows list.searchRow - Search row.cmp - Comparator.checkLast - If we need to optimistically check the last row right away.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018