org.axiondb.engine
Class DiskDatabase

java.lang.Object
  extended by org.axiondb.engine.BaseDatabase
      extended by org.axiondb.engine.DiskDatabase
All Implemented Interfaces:
Database

public class DiskDatabase
extends BaseDatabase
implements Database

A disk-resident Database.

Version:
$Revision: 1.20 $ $Date: 2004/09/09 23:47:45 $

Field Summary
 
Fields inherited from class org.axiondb.engine.BaseDatabase
SYSTABLE_DB_LINKS, SYSTABLE_INDEX_INFO
 
Fields inherited from interface org.axiondb.Database
COMMIT_SIZE
 
Constructor Summary
DiskDatabase(File dbDir)
           
DiskDatabase(String name, File dbDir)
           
DiskDatabase(String name, File dbDir, Properties props)
           
 
Method Summary
 void checkpoint()
          Make sure any modified state or data has been written to disk.
 void createSequence(Sequence seq)
          Create a numeric sequence
protected  Table createSystemTable(String name)
           
 void defrag()
           
 int defragTable(String tableName)
           
 File getDBDirectory()
          Get the directory into which table information is stored, or null.
 TableFactory getTableFactory(String name)
          Get the TableFactorycurrently registered for the given name, or null.
 void remount(File newdir)
          Notify this database that its root directory has been moved to the given location.
 void shutdown()
          Close this database and free any resources associated with it.
 
Methods inherited from class org.axiondb.engine.BaseDatabase
addDatabaseModificationListener, addIndex, addIndex, addTable, canResolveSelectable, createDatabaseLink, createMetaDataTables, dropDatabaseLink, dropIndex, dropSequence, dropTable, getBaseProperties, getDatabaseLink, getDatabaseModificationListeners, getDataType, getGlobalVariable, getIndexFactory, getName, getSequence, getSequenceCount, getSequences, getTable, getTable, getTables, getTransactionManager, hasDatabaseLink, hasIndex, hasSequence, hasTable, hasTable, isReadOnly, loadProperties, removeDatabaseModificationListener, renameTable, resolveFromNode, resolveSelectable, resolveSelectable, resolveSelectSelectable, tableAltered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.axiondb.Database
addDatabaseModificationListener, addIndex, addIndex, addTable, canResolveSelectable, createDatabaseLink, dropDatabaseLink, dropIndex, dropSequence, dropTable, getDatabaseLink, getDatabaseModificationListeners, getDataType, getGlobalVariable, getIndexFactory, getName, getSequence, getTable, getTable, getTransactionManager, hasDatabaseLink, hasIndex, hasSequence, hasTable, hasTable, isReadOnly, renameTable, resolveFromNode, resolveSelectable, resolveSelectable, tableAltered
 

Constructor Detail

DiskDatabase

public DiskDatabase(File dbDir)
             throws AxionException
Throws:
AxionException

DiskDatabase

public DiskDatabase(String name,
                    File dbDir)
             throws AxionException
Throws:
AxionException

DiskDatabase

public DiskDatabase(String name,
                    File dbDir,
                    Properties props)
             throws AxionException
Throws:
AxionException
Method Detail

checkpoint

public void checkpoint()
                throws AxionException
Description copied from interface: Database
Make sure any modified state or data has been written to disk.

Specified by:
checkpoint in interface Database
Overrides:
checkpoint in class BaseDatabase
Throws:
AxionException

createSequence

public void createSequence(Sequence seq)
                    throws AxionException
Description copied from interface: Database
Create a numeric sequence

Specified by:
createSequence in interface Database
Overrides:
createSequence in class BaseDatabase
Throws:
AxionException

defrag

public void defrag()
            throws AxionException
Throws:
AxionException

defragTable

public int defragTable(String tableName)
                throws AxionException
Throws:
AxionException

getDBDirectory

public File getDBDirectory()
Description copied from interface: Database
Get the directory into which table information is stored, or null.

Specified by:
getDBDirectory in interface Database

getTableFactory

public TableFactory getTableFactory(String name)
Description copied from interface: Database
Get the TableFactorycurrently registered for the given name, or null.

Specified by:
getTableFactory in interface Database
Overrides:
getTableFactory in class BaseDatabase

remount

public void remount(File newdir)
             throws AxionException
Description copied from interface: Database
Notify this database that its root directory has been moved to the given location. (E.g., the CD containing the data for a CD-resident database has changed drives.)

Specified by:
remount in interface Database
Overrides:
remount in class BaseDatabase
Throws:
AxionException

shutdown

public void shutdown()
              throws AxionException
Description copied from interface: Database
Close this database and free any resources associated with it.

Specified by:
shutdown in interface Database
Overrides:
shutdown in class BaseDatabase
Throws:
AxionException

createSystemTable

protected Table createSystemTable(String name)
Specified by:
createSystemTable in class BaseDatabase