public abstract class ReduceIndex
extends org.h2.index.BaseIndex
| Modifier and Type | Class and Description |
|---|---|
protected class |
ReduceIndex.FetchingCursor
Fetching cursor.
|
protected static interface |
ReduceIndex.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 |
ReduceIndex(GridKernalContext ctx) |
protected |
ReduceIndex(GridKernalContext ctx,
ReduceTable 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(ReduceResultPage page) |
protected abstract void |
addPage0(ReduceResultPage 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 ReduceResultPage |
createDummyLastPage(ReduceResultPage 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,
@Nullable org.h2.result.SearchRow first,
@Nullable org.h2.result.SearchRow last) |
org.h2.index.Cursor |
findFirstOrLast(org.h2.engine.Session ses,
boolean first) |
protected abstract org.h2.index.Cursor |
findInStream(@Nullable org.h2.result.SearchRow first,
@Nullable org.h2.result.SearchRow last) |
long |
getDiskSpaceUsed() |
long |
getRowCount(org.h2.engine.Session ses) |
long |
getRowCountApproximation() |
boolean |
hasSource(UUID nodeId) |
static <Z> Z |
last(List<Z> l) |
boolean |
needRebuild() |
protected Iterator<org.h2.value.Value[]> |
pollNextIterator(ReduceIndex.Pollable<ReduceResultPage> 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, createLookupBatch, find, findNext, getColumnIndex, getColumns, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDropSQL, getDuplicateKeyException, getIndexColumns, getIndexType, getPlanSQL, getRow, getTable, getType, initBaseIndex, isFindUsingFullTableScan, isFirstColumn, isHidden, isRowIdIndex, mayHaveNullDuplicates, 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
protected ReduceIndex(GridKernalContext ctx, ReduceTable 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 ReduceIndex(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(ReduceIndex.Pollable<ReduceResultPage> 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(ReduceResultPage page)
page - Page.protected final ReduceResultPage createDummyLastPage(ReduceResultPage lastPage)
lastPage - Real last page.protected abstract void addPage0(ReduceResultPage 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
@Nullable org.h2.result.SearchRow first,
@Nullable
@Nullable org.h2.result.SearchRow last)
first - Lower bound.last - Upper bound.ReduceIndex.FetchingCursor instance.protected abstract org.h2.index.Cursor findAllFetched(List<org.h2.result.Row> fetched, @Nullable @Nullable org.h2.result.SearchRow first, @Nullable @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.public static <Z> Z last(List<Z> l)
l - List.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023