org.axiondb.engine.indexes

Class BaseArrayIndex

public abstract class BaseArrayIndex extends BaseIndex implements Index

Abstract base implemenation for indicesthat maintain an in-memory, sorted array of key values (and their associated row identifiers). This type of index is fast to read, relatively slow to write and somewhat memory expensive when very large.

Version: $Revision: 1.10 $ $Date: 2005/12/20 18:32:30 $

Author: Rodney Waldhoff Chuck Burdick Ritesh Adval

Constructor Summary
BaseArrayIndex(String name, Column column, boolean unique)
BaseArrayIndex(String name, Column column, boolean unique, IntList values)
Method Summary
voidchangeRowId(Table table, Row row, int oldId, int newId)
protected abstract intfind(Object value, boolean required)
abstract IndexLoadergetIndexLoader()
RowIteratorgetInorderRowIterator(RowSource source)
abstract ListgetKeyList()
protected abstract ListgetKeyList(int minIndex, int maxIndex)
RowIteratorgetRowIterator(RowSource source, Function fn, Object value)
StringgetType()
protected IntListgetValueList()
protected abstract intinsertKey(Object value)
protected abstract intremoveKey(Object value)
protected abstract voidremoveKeyAt(int index)
voidrowDeleted(RowEvent event)
voidrowInserted(RowEvent event)
voidrowUpdated(RowEvent event)
voidsave(File dataDirectory)
voidsaveAfterTruncate(File dataDirectory)
booleansupportsFunction(Function fn)
voidtruncate()

Constructor Detail

BaseArrayIndex

public BaseArrayIndex(String name, Column column, boolean unique)

BaseArrayIndex

public BaseArrayIndex(String name, Column column, boolean unique, IntList values)

Method Detail

changeRowId

public void changeRowId(Table table, Row row, int oldId, int newId)

find

protected abstract int find(Object value, boolean required)

getIndexLoader

public abstract IndexLoader getIndexLoader()

getInorderRowIterator

public RowIterator getInorderRowIterator(RowSource source)

getKeyList

public abstract List getKeyList()

getKeyList

protected abstract List getKeyList(int minIndex, int maxIndex)

getRowIterator

public RowIterator getRowIterator(RowSource source, Function fn, Object value)

getType

public String getType()

getValueList

protected IntList getValueList()

insertKey

protected abstract int insertKey(Object value)

removeKey

protected abstract int removeKey(Object value)

removeKeyAt

protected abstract void removeKeyAt(int index)

rowDeleted

public void rowDeleted(RowEvent event)

rowInserted

public void rowInserted(RowEvent event)

rowUpdated

public void rowUpdated(RowEvent event)

save

public void save(File dataDirectory)

saveAfterTruncate

public void saveAfterTruncate(File dataDirectory)

supportsFunction

public boolean supportsFunction(Function fn)

truncate

public void truncate()