Top Description Fields Constructors Methods
org.h2.mvstore.db

public abstract Class MVIndex<K, V>

extends Index
Class Inheritance
Known Direct Subclasses
org.h2.mvstore.db.MVPrimaryIndex, org.h2.mvstore.db.MVSecondaryIndex, org.h2.mvstore.db.MVSpatialIndex, org.h2.mvstore.db.MVDelegateIndex
Imports
java.util.List, org.h2.index.Index, .IndexType, org.h2.mvstore.MVMap, org.h2.result.Row, org.h2.table.IndexColumn, .Table, org.h2.value.VersionedValue

An index that stores the data in an MVStore.

Field Summary

Inherited from org.h2.index.Index:
columnIdscolumnsindexColumnsindexTypetableuniqueColumnColumn

Constructor Summary

AccessConstructor and Description
protected
MVIndex(Table newTable, int id, String name, IndexColumn[] newIndexColumns, int uniqueColumnCount, IndexType newIndexType)

Method Summary

Modifier and TypeMethod and Description
public abstract void
addBufferedRows(List<String>
the names of the temporary storage
bufferNames
)

Add all the index data from the buffers to the index.

public abstract void
addRowsToBuffer(List<Row>
the rows
rows
,
String
the name of the temporary storage
bufferName
)

Add the rows to a temporary storage (not to the index yet).

public long
getDiskSpaceUsed(boolean
true to return quick approximation
approximate
)

Overrides org.h2.index.Index.getDiskSpaceUsed.

Get the used disk space for this index.

public abstract MVMap<K, VersionedValue<V>>
Inherited from org.h2.index.Index:
addcanFindNextcanGetFirstOrLastcanScancheckIndexColumnTypesclosecompareRowsfindfindFirstOrLastfindNextgetColumnIndexgetColumnsgetCostgetCostRangeIndexgetCreateSQLgetCreateSQLForCopygetDuplicateKeyExceptiongetDuplicatePrimaryKeyMessagegetIndexColumnsgetIndexTypegetPlanSQLgetRowgetRowCountgetRowCountApproximationgetRowFactorygetTablegetTypegetUniqueColumnCountgetUniqueRowFactoryisFindUsingFullTableScanisFirstColumnisRowIdIndexneedRebuildneedsUniqueCheckremoveremoveremoveChildrenAndResourcestruncateupdate

Constructor Detail

MVIndexback to summary
protected MVIndex(Table newTable, int id, String name, IndexColumn[] newIndexColumns, int uniqueColumnCount, IndexType newIndexType)

Method Detail

addBufferedRowsback to summary
public abstract void addBufferedRows(List<String> bufferNames)

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:List<String>

the names of the temporary storage

addRowsToBufferback to summary
public abstract void addRowsToBuffer(List<Row> rows, String bufferName)

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:List<Row>

the rows

bufferName:String

the name of the temporary storage

getDiskSpaceUsedback to summary
public long getDiskSpaceUsed(boolean approximate)

Overrides org.h2.index.Index.getDiskSpaceUsed.

Doc from org.h2.index.Index.getDiskSpaceUsed.

Get the used disk space for this index.

Parameters
approximate:boolean

true to return quick approximation

Returns:long

the estimated number of bytes

Annotations
@Override
getMVMapback to summary
public abstract MVMap<K, VersionedValue<V>> getMVMap()