Top Description Fields Constructors Methods
org.hsqldb

public Class RowAVLDiskData

extends RowAVL
Class Inheritance
Imports
org.hsqldb.index.NodeAVL, org.hsqldb.persist.PersistentStore, .RowStoreAVLDiskData, org.hsqldb.rowio.RowInputInterface, .RowOutputInterface

Implementation of rows for tables with memory resident indexes and disk-based data, such as TEXT tables.
Authors
Bob Preston (sqlbob@users dot sourceforge.net), Fred Toussi (fredt@users dot sourceforge.net)
Version
2.3.4, 1.7.0

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv boolean
pack-priv int
pack-priv RowStoreAVLDiskData
Inherited from org.hsqldb.RowAVL:
nPrimaryNode

Constructor Summary

AccessConstructor and Description
public
RowAVLDiskData(PersistentStore store, TableBase t, Object[] o)

Constructor for new rows.

public
RowAVLDiskData(RowStoreAVLDiskData store, TableBase t, RowInputInterface in)

Constructor when read from the disk into the Cache.

Method Summary

Modifier and TypeMethod and Description
public int
public Object[]
getData()

Overrides org.hsqldb.Row.getData.

Returns the array of fields in the database row.

public int
public int
public boolean
public NodeAVL
public boolean
isInMemory()

Overrides org.hsqldb.Row.isInMemory.

Implements org.hsqldb.persist.CachedObject.isInMemory.

used by Index, nodes are always in memory

public boolean
public boolean
public boolean
public boolean
public synchronized void
public void
setData(Object[] data)

public void
setInMemory(boolean in)

Overrides org.hsqldb.Row.setInMemory.

Implements org.hsqldb.persist.CachedObject.setInMemory.

required to purge cache

public void
setNewNodes(PersistentStore store)

Overrides org.hsqldb.RowAVL.setNewNodes.

Used when data is read from the disk into the Cache the first time.

public void
setPos(long
position in data file
pos
)

Overrides org.hsqldb.Row.setPos.

Implements org.hsqldb.persist.CachedObject.setPos.

Sets the file position for the row and registers the row with the table.

public void
public void
public void
write(RowOutputInterface out)

Overrides org.hsqldb.Row.write.

Implements org.hsqldb.persist.CachedObject.write.

Writes the data to disk.

Inherited from org.hsqldb.RowAVL:
clearNonPrimaryNodesdeletedestroygetNextNodegetNoderestore

Field Detail

accessCountback to summary
pack-priv int accessCount
hasDataChangedback to summary
pack-priv boolean hasDataChanged
storageSizeback to summary
pack-priv int storageSize
storeback to summary
pack-priv RowStoreAVLDiskData store

Constructor Detail

RowAVLDiskDataback to summary
public RowAVLDiskData(PersistentStore store, TableBase t, Object[] o)

Constructor for new rows.

RowAVLDiskDataback to summary
public RowAVLDiskData(RowStoreAVLDiskData store, TableBase t, RowInputInterface in)

Constructor when read from the disk into the Cache. The link with the Nodes is made separetly.

Method Detail

getAccessCountback to summary
public int getAccessCount()

Overrides org.hsqldb.Row.getAccessCount.

Implements org.hsqldb.persist.CachedObject.getAccessCount.

getDataback to summary
public Object[] getData()

Overrides org.hsqldb.Row.getData.

Doc from org.hsqldb.Row.getData.

Returns the array of fields in the database row.

getRealSizeback to summary
public int getRealSize(RowOutputInterface out)

Overrides org.hsqldb.Row.getRealSize.

Implements org.hsqldb.persist.CachedObject.getRealSize.

getStorageSizeback to summary
public int getStorageSize()

Overrides org.hsqldb.Row.getStorageSize.

Implements org.hsqldb.persist.CachedObject.getStorageSize.

hasChangedback to summary
public boolean hasChanged()

Overrides org.hsqldb.Row.hasChanged.

Implements org.hsqldb.persist.CachedObject.hasChanged.

insertNodeback to summary
public NodeAVL insertNode(int index)

Overrides org.hsqldb.RowAVL.insertNode.

isInMemoryback to summary
public boolean isInMemory()

Overrides org.hsqldb.Row.isInMemory.

Implements org.hsqldb.persist.CachedObject.isInMemory.

used by Index, nodes are always in memory

isKeepInMemoryback to summary
public boolean isKeepInMemory()

Overrides org.hsqldb.Row.isKeepInMemory.

Implements org.hsqldb.persist.CachedObject.isKeepInMemory.

isMemoryback to summary
public boolean isMemory()

Overrides org.hsqldb.Row.isMemory.

Implements org.hsqldb.persist.CachedObject.isMemory.

isNewback to summary
public boolean isNew()

Overrides org.hsqldb.Row.isNew.

Implements org.hsqldb.persist.CachedObject.isNew.

keepInMemoryback to summary
public boolean keepInMemory(boolean keep)

Overrides org.hsqldb.Row.keepInMemory.

Implements org.hsqldb.persist.CachedObject.keepInMemory.

setChangedback to summary
public synchronized void setChanged(boolean flag)

Overrides org.hsqldb.Row.setChanged.

Implements org.hsqldb.persist.CachedObject.setChanged.

setDataback to summary
public void setData(Object[] data)
setInMemoryback to summary
public void setInMemory(boolean in)

Overrides org.hsqldb.Row.setInMemory.

Implements org.hsqldb.persist.CachedObject.setInMemory.

required to purge cache

setNewNodesback to summary
public void setNewNodes(PersistentStore store)

Overrides org.hsqldb.RowAVL.setNewNodes.

Used when data is read from the disk into the Cache the first time. New Nodes are created which are then indexed.

setPosback to summary
public void setPos(long pos)

Overrides org.hsqldb.Row.setPos.

Implements org.hsqldb.persist.CachedObject.setPos.

Sets the file position for the row and registers the row with the table.

Parameters
pos:long

position in data file

setStorageSizeback to summary
public void setStorageSize(int size)

Overrides org.hsqldb.Row.setStorageSize.

Implements org.hsqldb.persist.CachedObject.setStorageSize.

updateAccessCountback to summary
public void updateAccessCount(int count)

Overrides org.hsqldb.Row.updateAccessCount.

Implements org.hsqldb.persist.CachedObject.updateAccessCount.

writeback to summary
public void write(RowOutputInterface out)

Overrides org.hsqldb.Row.write.

Implements org.hsqldb.persist.CachedObject.write.

Writes the data to disk. Unlike CachedRow, hasChanged is never set to true when changes are made to the Nodes. (Nodes are in-memory). The only time this is used is when a new Row is added to the Caches.