Package org.h2.mvstore.db
Class MVIndex<K,V>
java.lang.Object
org.h2.engine.DbObject
org.h2.schema.SchemaObject
org.h2.index.Index
org.h2.mvstore.db.MVIndex<K,V>
- All Implemented Interfaces:
HasSQL
- Direct Known Subclasses:
MVDelegateIndex,MVPrimaryIndex,MVSecondaryIndex,MVSpatialIndex
An index that stores the data in an MVStore.
-
Field Summary
Fields inherited from class org.h2.index.Index
columnIds, columns, indexColumns, indexType, table, uniqueColumnColumnFields inherited from class org.h2.engine.DbObject
AGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USERFields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMVIndex(Table newTable, int id, String name, IndexColumn[] newIndexColumns, int uniqueColumnCount, IndexType newIndexType) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddBufferedRows(List<String> bufferNames) Add all the index data from the buffers to the index.abstract voidaddRowsToBuffer(List<Row> rows, String bufferName) Add the rows to a temporary storage (not to the index yet).longgetDiskSpaceUsed(boolean approximate) Get the used disk space for this index.abstract MVMap<K,VersionedValue<V>> getMVMap()Methods inherited from class org.h2.index.Index
add, canFindNext, canGetFirstOrLast, canScan, checkIndexColumnTypes, close, compareRows, find, findFirstOrLast, findNext, getColumnIndex, getColumns, getCost, getCostRangeIndex, getCreateSQL, getCreateSQLForCopy, getDuplicateKeyException, getDuplicatePrimaryKeyMessage, getIndexColumns, getIndexType, getPlanSQL, getRow, getRowCount, getRowCountApproximation, getRowFactory, getTable, getType, getUniqueColumnCount, getUniqueRowFactory, isFindUsingFullTableScan, isFirstColumn, isRowIdIndex, needRebuild, needsUniqueCheck, remove, remove, removeChildrenAndResources, truncate, updateMethods inherited from class org.h2.schema.SchemaObject
getSchema, getSQL, getSQLMethods inherited from class org.h2.engine.DbObject
checkRename, getChildren, getComment, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, invalidate, isTemporary, isValid, rename, setComment, setModified, setObjectName, setTemporary, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.h2.util.HasSQL
getTraceSQL
-
Constructor Details
-
MVIndex
protected MVIndex(Table newTable, int id, String name, IndexColumn[] newIndexColumns, int uniqueColumnCount, IndexType newIndexType)
-
-
Method Details
-
addRowsToBuffer
Add the rows to a temporary storage (not to the index yet). The rows are sorted by the index columns. This is to more quickly build the index.- Parameters:
rows- the rowsbufferName- the name of the temporary storage
-
addBufferedRows
Add all the index data from the buffers to the index. The index will typically use merge sort to add the data more quickly in sorted order.- Parameters:
bufferNames- the names of the temporary storage
-
getMVMap
-
getDiskSpaceUsed
public long getDiskSpaceUsed(boolean approximate) Description copied from class:IndexGet the used disk space for this index.- Overrides:
getDiskSpaceUsedin classIndex- Parameters:
approximate-trueto return quick approximation- Returns:
- the estimated number of bytes
-