org.hsqldb.index
Class NodeAVL
- java.lang.Object
-
- org.hsqldb.index.NodeAVL
-
- All Implemented Interfaces:
- CachedObject
- Direct Known Subclasses:
- NodeAVLDisk, NodeAVLDiskLarge
public class NodeAVL extends java.lang.Object implements CachedObject
The parent for all AVL node implementations. Subclasses of Node vary in the way they hold references to other Nodes in the AVL tree, or to their Row data.
nNext links the Node objects belonging to different indexes for each table row. It is used solely by Row to locate the node belonging to a particular index.
New class derived from Hypersonic SQL code and enhanced in HSQLDB.- Since:
- Hypersonic SQL
-
-
Field Summary
Fields Modifier and Type Field and Description intiBalanceNodeAVLnNext-
Fields inherited from interface org.hsqldb.persist.CachedObject
emptyArray
-
-
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)intgetDefaultCapacity()longgetPos()intgetRealSize(RowOutputInterface out)RowAVLgetRow(PersistentStore store)intgetStorageSize()booleanhasChanged()booleanisBlock()booleanisInMemory()booleanisKeepInMemory()booleanisMemory()booleanisNew()booleankeepInMemory(boolean keep)voidread(RowInputInterface in)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)
-
-
-
Field Detail
-
iBalance
public int iBalance
-
nNext
public NodeAVL nNext
-
-
Constructor Detail
-
NodeAVL
public NodeAVL(Row r)
-
-
Method Detail
-
delete
public void delete()
-
getBalance
public int getBalance(PersistentStore store)
-
setBalance
public NodeAVL setBalance(PersistentStore store, int b)
-
child
public NodeAVL child(PersistentStore store, boolean isleft)
-
set
public NodeAVL set(PersistentStore store, boolean isLeft, NodeAVL n)
-
replace
public void replace(PersistentStore store, Index index, NodeAVL n)
-
setInMemory
public void setInMemory(boolean in)
- Specified by:
setInMemoryin interfaceCachedObject
-
getDefaultCapacity
public int getDefaultCapacity()
- Specified by:
getDefaultCapacityin interfaceCachedObject
-
read
public void read(RowInputInterface in)
- Specified by:
readin interfaceCachedObject
-
write
public void write(RowOutputInterface out)
- Specified by:
writein interfaceCachedObject
-
write
public void write(RowOutputInterface out, LongLookup lookup)
- Specified by:
writein interfaceCachedObject
-
getPos
public long getPos()
- Specified by:
getPosin interfaceCachedObject
-
getRow
public RowAVL getRow(PersistentStore store)
-
updateAccessCount
public void updateAccessCount(int count)
- Specified by:
updateAccessCountin interfaceCachedObject
-
getAccessCount
public int getAccessCount()
- Specified by:
getAccessCountin interfaceCachedObject
-
setStorageSize
public void setStorageSize(int size)
- Specified by:
setStorageSizein interfaceCachedObject
-
getStorageSize
public int getStorageSize()
- Specified by:
getStorageSizein interfaceCachedObject
-
isBlock
public final boolean isBlock()
- Specified by:
isBlockin interfaceCachedObject
-
setPos
public void setPos(long pos)
- Specified by:
setPosin interfaceCachedObject
-
isNew
public boolean isNew()
- Specified by:
isNewin interfaceCachedObject
-
hasChanged
public boolean hasChanged()
- Specified by:
hasChangedin interfaceCachedObject
-
isKeepInMemory
public boolean isKeepInMemory()
- Specified by:
isKeepInMemoryin interfaceCachedObject
-
keepInMemory
public boolean keepInMemory(boolean keep)
- Specified by:
keepInMemoryin interfaceCachedObject
-
isInMemory
public boolean isInMemory()
- Specified by:
isInMemoryin interfaceCachedObject
-
restore
public void restore()
- Specified by:
restorein interfaceCachedObject
-
destroy
public void destroy()
- Specified by:
destroyin interfaceCachedObject
-
getRealSize
public int getRealSize(RowOutputInterface out)
- Specified by:
getRealSizein interfaceCachedObject
-
isMemory
public boolean isMemory()
- Specified by:
isMemoryin interfaceCachedObject
-
-
DataMelt 3.0 © DataMelt by jWork.ORG