org.axiondb.engine.tables
Class MemoryTable

java.lang.Object
  extended by org.axiondb.event.BaseTableModificationPublisher
      extended by org.axiondb.engine.tables.AbstractBaseTable
          extended by org.axiondb.engine.tables.BaseTable
              extended by org.axiondb.engine.tables.MemoryTable
All Implemented Interfaces:
RowSource, Table

public class MemoryTable
extends BaseTable
implements Table

A memory-resident Table.

Version:
$Revision: 1.9 $ $Date: 2005/12/22 09:02:31 $

Field Summary
 
Fields inherited from interface org.axiondb.Table
REGULAR_TABLE_TYPE, SYSTEM_TABLE_TYPE
 
Constructor Summary
MemoryTable(java.lang.String name)
           
MemoryTable(java.lang.String name, java.lang.String type)
           
 
Method Summary
 void applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids)
          Remove the specified rows from this table and any associated indices.
 void applyInserts(RowCollection rows)
          Insert the given rows into this table and any associated indices.
 void applyUpdates(RowCollection rows)
          Update the given rows in this table and any associated indices.
 void freeRowId(int id)
          Un-reserve a row id.
 int getNextRowId()
          Reserve a row id.
 Row getRow(int id)
           
 int getRowCount()
          Return the number of Rows I contain.
protected  RowIterator getRowIterator()
           
 void populateIndex(Index index)
          Populate an Index, adding my current rows to it.
 void truncate()
          Unconditionally delete all rows in this table.
 
Methods inherited from class org.axiondb.engine.tables.BaseTable
addColumn, addConstraint, addIndex, addRow, applyDeletesToIndices, applyInsertsToIndices, applyUpdatesToIndices, checkpoint, clearCache, deleteRow, drop, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraint, getConstraints, getIndexedRows, getIndexedRows, getIndexForColumn, getIndices, getName, getRowIterator, getSequence, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, notifyColumnsOfNewLobDir, readColumns, readConstraints, recreateIndices, remount, removeConstraint, removeIndex, rename, setName, setSequence, setType, shutdown, toString, truncateIndices, updateRow, writeColumns, writeConstraints
 
Methods inherited from class org.axiondb.engine.tables.AbstractBaseTable
checkConstraints, checkConstraints, checkConstraints, getMatchingRows, hasDeferredConstraint, isDeferAll, migrate
 
Methods inherited from class org.axiondb.event.BaseTableModificationPublisher
addTableModificationListener, getTableModificationListeners, publishEvent, removeTableModificationListener, setDeferAllConstraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.Table
addColumn, addConstraint, addIndex, addRow, addTableModificationListener, checkpoint, deleteRow, drop, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraint, getConstraints, getIndexedRows, getIndexedRows, getIndexForColumn, getIndices, getMatchingRows, getName, getRowIterator, getSequence, getTableModificationListeners, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, migrate, remount, removeConstraint, removeIndex, removeTableModificationListener, rename, setDeferAllConstraints, setSequence, shutdown, updateRow
 

Constructor Detail

MemoryTable

public MemoryTable(java.lang.String name)

MemoryTable

public MemoryTable(java.lang.String name,
                   java.lang.String type)
Method Detail

applyDeletes

public void applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids)
                  throws AxionException
Description copied from interface: Table
Remove the specified rows from this table and any associated indices. This process is allowed to be destructive, the table my delete values from the given list.

Specified by:
applyDeletes in interface Table
Specified by:
applyDeletes in class BaseTable
Throws:
AxionException

applyInserts

public void applyInserts(RowCollection rows)
                  throws AxionException
Description copied from interface: Table
Insert the given rows into this table and any associated indices. This process is allowed to be destructive, the table my delete rows from the given list.

Specified by:
applyInserts in interface Table
Specified by:
applyInserts in class BaseTable
Parameters:
rows - a collection of Rows
Throws:
AxionException

applyUpdates

public void applyUpdates(RowCollection rows)
                  throws AxionException
Description copied from interface: Table
Update the given rows in this table and any associated indices. This process is allowed to be destructive, the table my delete rows from the given list.

Specified by:
applyUpdates in interface Table
Specified by:
applyUpdates in class BaseTable
Throws:
AxionException

freeRowId

public final void freeRowId(int id)
Description copied from interface: Table
Un-reserve a row id.

Specified by:
freeRowId in interface Table
Specified by:
freeRowId in class BaseTable

getNextRowId

public final int getNextRowId()
Description copied from interface: Table
Reserve a row id.

Specified by:
getNextRowId in interface Table
Specified by:
getNextRowId in class BaseTable

getRow

public final Row getRow(int id)
Specified by:
getRow in interface RowSource
Specified by:
getRow in class BaseTable

getRowCount

public final int getRowCount()
Description copied from interface: Table
Return the number of Rows I contain.

Specified by:
getRowCount in interface Table
Specified by:
getRowCount in class BaseTable

populateIndex

public void populateIndex(Index index)
                   throws AxionException
Description copied from interface: Table
Populate an Index, adding my current rows to it. Does not addthe index.

Specified by:
populateIndex in interface Table
Specified by:
populateIndex in class BaseTable
Throws:
AxionException
See Also:
Table.addIndex(org.axiondb.Index)

truncate

public void truncate()
              throws AxionException
Description copied from interface: Table
Unconditionally delete all rows in this table.

Specified by:
truncate in interface Table
Throws:
AxionException

getRowIterator

protected RowIterator getRowIterator()
                              throws AxionException
Specified by:
getRowIterator in class BaseTable
Throws:
AxionException