Top Description Fields Constructors Methods
org.hsqldb.index

public Class NodeAVL

extends Object
implements CachedObject
Class Inheritance
All Implemented Interfaces
org.hsqldb.persist.CachedObject
Known Direct Subclasses
org.hsqldb.index.NodeAVLDisk, org.hsqldb.index.NodeAVLDiskLarge
Imports
org.hsqldb.Row, .RowAVL, .RowAVLDisk, org.hsqldb.lib.LongLookup, org.hsqldb.persist.CachedObject, .PersistentStore, org.hsqldb.rowio.RowOutputInterface, .RowInputInterface

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.

Authors
Fred Toussi (fredt@users dot sourceforge dot net), Thomas Mueller (Hypersonic SQL Group)
Since
Hypersonic SQL
Version
2.3.3

Field Summary

Modifier and TypeField and Description
public int
protected NodeAVL
public NodeAVL
pack-priv static final int
protected NodeAVL
protected NodeAVL
protected final Row

Constructor Summary

AccessConstructor and Description
pack-priv
public

Method Summary

Modifier and TypeMethod and Description
public NodeAVL
child(PersistentStore store, boolean isleft)

public void
public void
pack-priv boolean
public int
public int
protected Object[]
public int
pack-priv NodeAVL
pack-priv NodeAVL
public long
public int
pack-priv NodeAVL
getRight(PersistentStore persistentStore)

public RowAVL
public int
public boolean
public final boolean
pack-priv boolean
public boolean
public final boolean
public boolean
pack-priv boolean
public boolean
public boolean
pack-priv boolean
pack-priv boolean
public boolean
public void
public void
public void
public NodeAVL
set(PersistentStore store, boolean isLeft, NodeAVL n)

public NodeAVL
public void
public void
pack-priv NodeAVL
setLeft(PersistentStore persistentStore, NodeAVL n)

pack-priv NodeAVL
setParent(PersistentStore persistentStore, NodeAVL n)

public void
pack-priv NodeAVL
setRight(PersistentStore persistentStore, NodeAVL n)

public void
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

iBalanceback to summary
public int iBalance
nLeftback to summary
protected NodeAVL nLeft
nNextback to summary
public NodeAVL nNext
NO_POSback to summary
pack-priv static final int NO_POS
nParentback to summary
protected NodeAVL nParent
nRightback to summary
protected NodeAVL nRight
rowback to summary
protected final Row row

Constructor Detail

NodeAVLback to summary
pack-priv NodeAVL()
NodeAVLback to summary
public NodeAVL(Row r)

Method Detail

childback to summary
public NodeAVL child(PersistentStore store, boolean isleft)
deleteback to summary
public void delete()
destroyback to summary
public void destroy()

Implements org.hsqldb.persist.CachedObject.destroy.

equalsback to summary
pack-priv boolean equals(NodeAVL n)
getAccessCountback to summary
public int getAccessCount()

Implements org.hsqldb.persist.CachedObject.getAccessCount.

getBalanceback to summary
public int getBalance(PersistentStore store)
getDataback to summary
protected Object[] getData(PersistentStore store)
getDefaultCapacityback to summary
public int getDefaultCapacity()

Implements org.hsqldb.persist.CachedObject.getDefaultCapacity.

getLeftback to summary
pack-priv NodeAVL getLeft(PersistentStore store)
getParentback to summary
pack-priv NodeAVL getParent(PersistentStore store)
getPosback to summary
public long getPos()

Implements org.hsqldb.persist.CachedObject.getPos.

getRealSizeback to summary
public int getRealSize(RowOutputInterface out)

Implements org.hsqldb.persist.CachedObject.getRealSize.

getRightback to summary
pack-priv NodeAVL getRight(PersistentStore persistentStore)
getRowback to summary
public RowAVL getRow(PersistentStore store)
getStorageSizeback to summary
public int getStorageSize()

Implements org.hsqldb.persist.CachedObject.getStorageSize.

hasChangedback to summary
public boolean hasChanged()

Implements org.hsqldb.persist.CachedObject.hasChanged.

isBlockback to summary
public final boolean isBlock()

Implements org.hsqldb.persist.CachedObject.isBlock.

isFromLeftback to summary
pack-priv boolean isFromLeft(PersistentStore store)
isInMemoryback to summary
public boolean isInMemory()

Implements org.hsqldb.persist.CachedObject.isInMemory.

isInvariableback to summary
public final boolean isInvariable()

Implements org.hsqldb.persist.CachedObject.isInvariable.

isKeepInMemoryback to summary
public boolean isKeepInMemory()

Implements org.hsqldb.persist.CachedObject.isKeepInMemory.

isLeftback to summary
pack-priv boolean isLeft(PersistentStore store, NodeAVL node)
isMemoryback to summary
public boolean isMemory()

Implements org.hsqldb.persist.CachedObject.isMemory.

isNewback to summary
public boolean isNew()

Implements org.hsqldb.persist.CachedObject.isNew.

isRightback to summary
pack-priv boolean isRight(PersistentStore store, NodeAVL node)
isRootback to summary
pack-priv boolean isRoot(PersistentStore store)
keepInMemoryback to summary
public boolean keepInMemory(boolean keep)

Implements org.hsqldb.persist.CachedObject.keepInMemory.

readback to summary
public void read(RowInputInterface in)

Implements org.hsqldb.persist.CachedObject.read.

replaceback to summary
public void replace(PersistentStore store, Index index, NodeAVL n)
restoreback to summary
public void restore()

Implements org.hsqldb.persist.CachedObject.restore.

setback to summary
public NodeAVL set(PersistentStore store, boolean isLeft, NodeAVL n)
setBalanceback to summary
public NodeAVL setBalance(PersistentStore store, int b)
setChangedback to summary
public void setChanged(boolean flag)

Implements org.hsqldb.persist.CachedObject.setChanged.

setInMemoryback to summary
public void setInMemory(boolean in)

Implements org.hsqldb.persist.CachedObject.setInMemory.

setLeftback to summary
pack-priv NodeAVL setLeft(PersistentStore persistentStore, NodeAVL n)
setParentback to summary
pack-priv NodeAVL setParent(PersistentStore persistentStore, NodeAVL n)
setPosback to summary
public void setPos(long pos)

Implements org.hsqldb.persist.CachedObject.setPos.

setRightback to summary
pack-priv NodeAVL setRight(PersistentStore persistentStore, NodeAVL n)
setStorageSizeback to summary
public void setStorageSize(int size)

Implements org.hsqldb.persist.CachedObject.setStorageSize.

updateAccessCountback to summary
public void updateAccessCount(int count)

Implements org.hsqldb.persist.CachedObject.updateAccessCount.

writeback to summary
public void write(RowOutputInterface out)

Implements org.hsqldb.persist.CachedObject.write.

writeback to summary
public void write(RowOutputInterface out, LongLookup lookup)

Implements org.hsqldb.persist.CachedObject.write.