public abstract class GridH2IndexBase
extends org.h2.index.BaseIndex
| Modifier and Type | Class and Description |
|---|---|
protected class |
GridH2IndexBase.FilteringIterator
Iterator which filters by expiration time and predicate.
|
| Modifier and Type | Field and Description |
|---|---|
protected static ThreadLocal<org.gridgain.grid.spi.indexing.GridIndexingQueryFilter<?,?>[]> |
filters |
protected int |
keyCol |
protected int |
valCol |
| Constructor and Description |
|---|
GridH2IndexBase(int keyCol,
int valCol) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.h2.engine.Session ses,
org.h2.result.Row row) |
void |
checkRename() |
protected Iterator<GridH2Row> |
filter(Iterator<GridH2Row> iter)
Filters rows from expired ones and using predicate.
|
long |
getDiskSpaceUsed() |
boolean |
needRebuild() |
abstract GridH2Row |
put(GridH2Row row,
boolean ifAbsent)
Put row if absent.
|
GridH2IndexBase |
rebuild(org.gridgain.grid.util.offheap.unsafe.GridUnsafeMemory memory)
If the index supports rebuilding it has to creates its own copy.
|
void |
releaseSnapshot()
Releases snapshot for current thread.
|
abstract GridH2Row |
remove(org.h2.result.SearchRow row)
Remove row from index.
|
void |
remove(org.h2.engine.Session ses) |
void |
remove(org.h2.engine.Session ses,
org.h2.result.Row row) |
static void |
setFiltersForThread(org.gridgain.grid.spi.indexing.GridIndexingQueryFilter<?,?>[] fs)
Sets key filters for current thread.
|
Object |
takeSnapshot(Object s)
Takes or sets existing snapshot to be used in current thread.
|
void |
truncate(org.h2.engine.Session ses) |
canFindNext, canScan, checkIndexColumnTypes, commit, compareRows, containsNullAndAllowMultipleNull, find, findNext, getColumnIndex, getColumns, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDropSQL, getDuplicateKeyException, getIndexColumns, getIndexType, getPlanSQL, getRow, getTable, getType, initBaseIndex, isHidden, isRowIdIndex, removeChildrenAndResources, setSortedInsertModegetChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, rename, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected static final ThreadLocal<org.gridgain.grid.spi.indexing.GridIndexingQueryFilter<?,?>[]> filters
protected final int keyCol
protected final int valCol
public GridH2IndexBase(int keyCol,
int valCol)
keyCol - Key column.valCol - Value column.public static void setFiltersForThread(org.gridgain.grid.spi.indexing.GridIndexingQueryFilter<?,?>[] fs)
fs - Filters.public GridH2IndexBase rebuild(org.gridgain.grid.util.offheap.unsafe.GridUnsafeMemory memory) throws InterruptedException
memory - Memory.InterruptedException - If interrupted.public abstract GridH2Row put(GridH2Row row, boolean ifAbsent)
row - Row.ifAbsent - Put only if such a row does not exist.public abstract GridH2Row remove(org.h2.result.SearchRow row)
row - Row.public Object takeSnapshot(@Nullable Object s)
s - Optional existing snapshot to use.public void releaseSnapshot()
protected Iterator<GridH2Row> filter(Iterator<GridH2Row> iter)
iter - Iterator over rows.public long getDiskSpaceUsed()
public void checkRename()
checkRename in interface org.h2.engine.DbObjectcheckRename in class org.h2.engine.DbObjectBasepublic 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 needRebuild()
Copyright © 2014. All rights reserved.