use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.
the class RowAVLDiskData method insertNode.
public NodeAVL insertNode(int index) {
NodeAVL backnode = getNode(index - 1);
NodeAVL newnode = new NodeAVLMemoryPointer(this);
newnode.nNext = backnode.nNext;
backnode.nNext = newnode;
return newnode;
}
use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.
the class RowAVLDiskData method setNewNodes.
/**
* Used when data is read from the disk into the Cache the first time.
* New Nodes are created which are then indexed.
*/
void setNewNodes() {
int index = tTable.getIndexCount();
nPrimaryNode = new NodeAVLMemoryPointer(this);
NodeAVL n = nPrimaryNode;
for (int i = 1; i < index; i++) {
n.nNext = new NodeAVLMemoryPointer(this);
n = n.nNext;
}
}
use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.
the class RowStoreAVLDisk method getAccessor.
public CachedObject getAccessor(Index key) {
NodeAVL node = (NodeAVL) accessorList[key.getPosition()];
if (node == null) {
return null;
}
if (!node.isInMemory()) {
RowAVL row = (RowAVL) get(node.getPos(), false);
node = row.getNode(key.getPosition());
accessorList[key.getPosition()] = node;
}
return node;
}
use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.
the class RowAVLDiskData method setPos.
/**
* Sets the file position for the row and registers the row with
* the table.
*
* @param pos position in data file
*/
public void setPos(int pos) {
position = pos;
NodeAVL n = nPrimaryNode;
while (n != null) {
((NodeAVLMemoryPointer) n).iData = position;
n = n.nNext;
}
}
use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.
the class RowAVL method clearNonPrimaryNodes.
public void clearNonPrimaryNodes() {
NodeAVL n = nPrimaryNode.nNext;
while (n != null) {
n.delete();
n.iBalance = 0;
n = n.nNext;
}
}
Aggregations