Search in sources :

Example 6 with NodeAVL

use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.

the class RowAVL method restore.

public void restore() {
    NodeAVL n = nPrimaryNode;
    while (n != null) {
        n.iBalance = 0;
        n = n.nNext;
    }
}
Also used : NodeAVL(org.hsqldb_voltpatches.index.NodeAVL)

Example 7 with NodeAVL

use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.

the class RowAVL method insertNode.

public NodeAVL insertNode(int index) {
    NodeAVL backnode = getNode(index - 1);
    NodeAVL newnode = new NodeAVLMemory(this);
    newnode.nNext = backnode.nNext;
    backnode.nNext = newnode;
    return newnode;
}
Also used : NodeAVL(org.hsqldb_voltpatches.index.NodeAVL) NodeAVLMemory(org.hsqldb_voltpatches.index.NodeAVLMemory)

Example 8 with NodeAVL

use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.

the class RowAVLDisk method write.

public void write(RowOutputInterface out, IntLookup lookup) {
    out.writeSize(storageSize);
    NodeAVL rownode = nPrimaryNode;
    while (rownode != null) {
        ((NodeAVLDisk) rownode).writeTranslate(out, lookup);
        rownode = rownode.nNext;
    }
    out.writeData(getData(), tTable.colTypes);
    out.writeEnd();
}
Also used : NodeAVL(org.hsqldb_voltpatches.index.NodeAVL) NodeAVLDisk(org.hsqldb_voltpatches.index.NodeAVLDisk)

Example 9 with NodeAVL

use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.

the class RowAVLDisk method setNewNodes.

/**
     * used in CachedDataRow
     */
void setNewNodes() {
    int indexcount = tTable.getIndexCount();
    nPrimaryNode = new NodeAVLDisk(this, 0);
    NodeAVL n = nPrimaryNode;
    for (int i = 1; i < indexcount; i++) {
        n.nNext = new NodeAVLDisk(this, i);
        n = n.nNext;
    }
}
Also used : NodeAVL(org.hsqldb_voltpatches.index.NodeAVL) NodeAVLDisk(org.hsqldb_voltpatches.index.NodeAVLDisk)

Example 10 with NodeAVL

use of org.hsqldb_voltpatches.index.NodeAVL in project voltdb by VoltDB.

the class RowAVLDisk method setPos.

/**
     * Sets the file position for the row
     *
     * @param pos position in data file
     */
public void setPos(int pos) {
    position = pos;
    NodeAVL n = nPrimaryNode;
    while (n != null) {
        ((NodeAVLDisk) n).iData = position;
        n = n.nNext;
    }
}
Also used : NodeAVL(org.hsqldb_voltpatches.index.NodeAVL)

Aggregations

NodeAVL (org.hsqldb_voltpatches.index.NodeAVL)15 RowAVL (org.hsqldb_voltpatches.RowAVL)4 Row (org.hsqldb_voltpatches.Row)2 NodeAVLDisk (org.hsqldb_voltpatches.index.NodeAVLDisk)2 NodeAVLMemoryPointer (org.hsqldb_voltpatches.index.NodeAVLMemoryPointer)2 RowIterator (org.hsqldb_voltpatches.navigator.RowIterator)2 HsqlException (org.hsqldb_voltpatches.HsqlException)1 NodeAVLMemory (org.hsqldb_voltpatches.index.NodeAVLMemory)1