org.hsqldb.index
Class NodeAVLDisk
- java.lang.Object
-
- org.hsqldb.index.NodeAVL
-
- org.hsqldb.index.NodeAVLDisk
-
- All Implemented Interfaces:
- CachedObject
public class NodeAVLDisk extends NodeAVL
Cached table Node implementation.Only integral references to left, right and parent nodes in the AVL tree are held and used as pointers data.
iId is a reference to the Index object that contains this node.
This fields can be eliminated in the future, by changing the method signatures to take a Index parameter from Index.java (fredt@users) New class derived from Hypersonic SQL code and enhanced in HSQLDB.- Since:
- Hypersonic SQL
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZE_IN_BYTE-
Fields inherited from interface org.hsqldb.persist.CachedObject
emptyArray
-
-
Constructor Summary
Constructors Constructor and Description NodeAVLDisk(RowAVLDisk r, int id)NodeAVLDisk(RowAVLDisk r, RowInputInterface in, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NodeAVLchild(PersistentStore store, boolean isleft)voiddelete()voiddestroy()intgetAccessCount()intgetBalance(PersistentStore store)java.lang.Object[]getData(PersistentStore store)longgetPos()intgetRealSize(RowOutputInterface out)RowAVLgetRow(PersistentStore store)intgetStorageSize()booleanhasChanged()booleanisInMemory()booleanisKeepInMemory()booleanisMemory()booleanisNew()booleankeepInMemory(boolean keep)voidreplace(PersistentStore store, Index index, NodeAVL n)voidrestore()NodeAVLset(PersistentStore store, boolean isLeft, NodeAVL n)NodeAVLsetBalance(PersistentStore store, int b)voidsetInMemory(boolean in)voidsetPos(long pos)voidsetStorageSize(int size)voidupdateAccessCount(int count)voidwrite(RowOutputInterface out)voidwrite(RowOutputInterface out, LongLookup lookup)-
Methods inherited from class org.hsqldb.index.NodeAVL
getDefaultCapacity, isBlock, read
-
-
-
-
Field Detail
-
SIZE_IN_BYTE
public static final int SIZE_IN_BYTE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NodeAVLDisk
public NodeAVLDisk(RowAVLDisk r, RowInputInterface in, int id) throws java.io.IOException
- Throws:
java.io.IOException
-
NodeAVLDisk
public NodeAVLDisk(RowAVLDisk r, int id)
-
-
Method Detail
-
isInMemory
public boolean isInMemory()
- Specified by:
isInMemoryin interfaceCachedObject- Overrides:
isInMemoryin classNodeAVL
-
isMemory
public boolean isMemory()
- Specified by:
isMemoryin interfaceCachedObject- Overrides:
isMemoryin classNodeAVL
-
getPos
public long getPos()
- Specified by:
getPosin interfaceCachedObject- Overrides:
getPosin classNodeAVL
-
getRow
public RowAVL getRow(PersistentStore store)
-
getData
public java.lang.Object[] getData(PersistentStore store)
-
getBalance
public int getBalance(PersistentStore store)
- Overrides:
getBalancein classNodeAVL
-
child
public NodeAVL child(PersistentStore store, boolean isleft)
-
setBalance
public NodeAVL setBalance(PersistentStore store, int b)
- Overrides:
setBalancein classNodeAVL
-
set
public NodeAVL set(PersistentStore store, boolean isLeft, NodeAVL n)
-
replace
public void replace(PersistentStore store, Index index, NodeAVL n)
-
getRealSize
public int getRealSize(RowOutputInterface out)
- Specified by:
getRealSizein interfaceCachedObject- Overrides:
getRealSizein classNodeAVL
-
setInMemory
public void setInMemory(boolean in)
- Specified by:
setInMemoryin interfaceCachedObject- Overrides:
setInMemoryin classNodeAVL
-
write
public void write(RowOutputInterface out)
- Specified by:
writein interfaceCachedObject- Overrides:
writein classNodeAVL
-
write
public void write(RowOutputInterface out, LongLookup lookup)
- Specified by:
writein interfaceCachedObject- Overrides:
writein classNodeAVL
-
restore
public void restore()
- Specified by:
restorein interfaceCachedObject- Overrides:
restorein classNodeAVL
-
destroy
public void destroy()
- Specified by:
destroyin interfaceCachedObject- Overrides:
destroyin classNodeAVL
-
updateAccessCount
public void updateAccessCount(int count)
- Specified by:
updateAccessCountin interfaceCachedObject- Overrides:
updateAccessCountin classNodeAVL
-
getAccessCount
public int getAccessCount()
- Specified by:
getAccessCountin interfaceCachedObject- Overrides:
getAccessCountin classNodeAVL
-
setStorageSize
public void setStorageSize(int size)
- Specified by:
setStorageSizein interfaceCachedObject- Overrides:
setStorageSizein classNodeAVL
-
getStorageSize
public int getStorageSize()
- Specified by:
getStorageSizein interfaceCachedObject- Overrides:
getStorageSizein classNodeAVL
-
setPos
public void setPos(long pos)
- Specified by:
setPosin interfaceCachedObject- Overrides:
setPosin classNodeAVL
-
isNew
public boolean isNew()
- Specified by:
isNewin interfaceCachedObject- Overrides:
isNewin classNodeAVL
-
hasChanged
public boolean hasChanged()
- Specified by:
hasChangedin interfaceCachedObject- Overrides:
hasChangedin classNodeAVL
-
isKeepInMemory
public boolean isKeepInMemory()
- Specified by:
isKeepInMemoryin interfaceCachedObject- Overrides:
isKeepInMemoryin classNodeAVL
-
keepInMemory
public boolean keepInMemory(boolean keep)
- Specified by:
keepInMemoryin interfaceCachedObject- Overrides:
keepInMemoryin classNodeAVL
-
-
DataMelt 3.0 © DataMelt by jWork.ORG