org.hsqldb
Class RowAVLDiskData
- java.lang.Object
-
- org.hsqldb.Row
-
- org.hsqldb.RowAVL
-
- org.hsqldb.RowAVLDiskData
-
- All Implemented Interfaces:
- CachedObject
public class RowAVLDiskData extends RowAVL
Implementation of rows for tables with memory resident indexes and disk-based data, such as TEXT tables.
-
-
Field Summary
-
Fields inherited from class org.hsqldb.RowAVL
nPrimaryNode
-
Fields inherited from interface org.hsqldb.persist.CachedObject
emptyArray
-
-
Constructor Summary
Constructors Constructor and Description RowAVLDiskData(PersistentStore store, TableBase t, java.lang.Object[] o)Constructor for new rows.RowAVLDiskData(PersistentStore store, TableBase t, RowInputInterface in)Constructor when read from the disk into the Cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetAccessCount()java.lang.Object[]getData()Returns the array of fields in the database row.intgetRealSize(RowOutputInterface out)voidgetRowData(TableBase t, RowInputInterface in)intgetStorageSize()booleanhasChanged()NodeAVLinsertNode(int index)booleanisInMemory()used by Index, nodes are always in memorybooleanisKeepInMemory()booleanisMemory()booleanisNew()booleankeepInMemory(boolean keep)voidsetChanged(boolean changed)voidsetData(java.lang.Object[] data)voidsetInMemory(boolean in)required to purge cachevoidsetNewNodes(PersistentStore store)Used when data is read from the disk into the Cache the first time.voidsetPos(long pos)Sets the file position for the row and registers the row with the table.voidsetStorageSize(int size)voidupdateAccessCount(int count)voidwrite(RowOutputInterface out)Writes the data to disk.-
Methods inherited from class org.hsqldb.RowAVL
clearNonPrimaryNodes, delete, destroy, getNode, restore
-
-
-
-
Constructor Detail
-
RowAVLDiskData
public RowAVLDiskData(PersistentStore store, TableBase t, java.lang.Object[] o)
Constructor for new rows.
-
RowAVLDiskData
public RowAVLDiskData(PersistentStore store, TableBase t, RowInputInterface in) throws java.io.IOException
Constructor when read from the disk into the Cache. The link with the Nodes is made separetly.- Throws:
java.io.IOException
-
-
Method Detail
-
getRowData
public void getRowData(TableBase t, RowInputInterface in) throws java.io.IOException
- Throws:
java.io.IOException
-
setData
public void setData(java.lang.Object[] data)
-
getData
public java.lang.Object[] getData()
Description copied from class:RowReturns the array of fields in the database row.
-
setNewNodes
public void setNewNodes(PersistentStore store)
Used when data is read from the disk into the Cache the first time. New Nodes are created which are then indexed.- Overrides:
setNewNodesin classRowAVL
-
insertNode
public NodeAVL insertNode(int index)
- Overrides:
insertNodein classRowAVL
-
getRealSize
public int getRealSize(RowOutputInterface out)
- Specified by:
getRealSizein interfaceCachedObject- Overrides:
getRealSizein classRow
-
write
public void write(RowOutputInterface out)
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.- Specified by:
writein interfaceCachedObject- Overrides:
writein classRow
-
setChanged
public void setChanged(boolean changed)
- Overrides:
setChangedin classRow
-
isNew
public boolean isNew()
- Specified by:
isNewin interfaceCachedObject- Overrides:
isNewin classRow
-
hasChanged
public boolean hasChanged()
- Specified by:
hasChangedin interfaceCachedObject- Overrides:
hasChangedin classRow
-
updateAccessCount
public void updateAccessCount(int count)
- Specified by:
updateAccessCountin interfaceCachedObject- Overrides:
updateAccessCountin classRow
-
getAccessCount
public int getAccessCount()
- Specified by:
getAccessCountin interfaceCachedObject- Overrides:
getAccessCountin classRow
-
getStorageSize
public int getStorageSize()
- Specified by:
getStorageSizein interfaceCachedObject- Overrides:
getStorageSizein classRow
-
setStorageSize
public void setStorageSize(int size)
- Specified by:
setStorageSizein interfaceCachedObject- Overrides:
setStorageSizein classRow
-
setPos
public void setPos(long pos)
Sets the file position for the row and registers the row with the table.- Specified by:
setPosin interfaceCachedObject- Overrides:
setPosin classRow- Parameters:
pos- position in data file
-
isMemory
public boolean isMemory()
- Specified by:
isMemoryin interfaceCachedObject- Overrides:
isMemoryin classRow
-
isInMemory
public boolean isInMemory()
used by Index, nodes are always in memory- Specified by:
isInMemoryin interfaceCachedObject- Overrides:
isInMemoryin classRow
-
isKeepInMemory
public boolean isKeepInMemory()
- Specified by:
isKeepInMemoryin interfaceCachedObject- Overrides:
isKeepInMemoryin classRow
-
keepInMemory
public boolean keepInMemory(boolean keep)
- Specified by:
keepInMemoryin interfaceCachedObject- Overrides:
keepInMemoryin classRow
-
setInMemory
public void setInMemory(boolean in)
required to purge cache- Specified by:
setInMemoryin interfaceCachedObject- Overrides:
setInMemoryin classRow
-
-
DataMelt 3.0 © DataMelt by jWork.ORG