use of org.hsqldb_voltpatches.RowAVLDisk in project voltdb by VoltDB.
the class RowStoreAVLDisk method getNewCachedObject.
public CachedObject getNewCachedObject(Session session, Object object) {
Row row = new RowAVLDisk(table, (Object[]) object);
add(row);
if (session != null) {
RowAction.addAction(session, RowAction.ACTION_INSERT, table, row);
}
return row;
}
use of org.hsqldb_voltpatches.RowAVLDisk in project voltdb by VoltDB.
the class NodeAVLDisk method getLeft.
NodeAVL getLeft(PersistentStore store) {
NodeAVLDisk node = this;
RowAVLDisk row = this.row;
if (!row.isInMemory()) {
row = (RowAVLDisk) store.get(this.row, false);
node = (NodeAVLDisk) row.getNode(iId);
}
if (node.iLeft == NO_POS) {
return null;
}
if (node.nLeft == null || !node.nLeft.isInMemory()) {
node.nLeft = findNode(store, node.iLeft);
node.nLeft.nParent = node;
}
return node.nLeft;
}
use of org.hsqldb_voltpatches.RowAVLDisk in project voltdb by VoltDB.
the class NodeAVLDisk method getRight.
NodeAVL getRight(PersistentStore store) {
NodeAVLDisk node = this;
RowAVLDisk row = this.row;
if (!row.isInMemory()) {
row = (RowAVLDisk) store.get(this.row, false);
node = (NodeAVLDisk) row.getNode(iId);
}
if (node.iRight == NO_POS) {
return null;
}
if (node.nRight == null || !node.nRight.isInMemory()) {
node.nRight = findNode(store, node.iRight);
node.nRight.nParent = node;
}
return node.nRight;
}
use of org.hsqldb_voltpatches.RowAVLDisk in project voltdb by VoltDB.
the class NodeAVLDisk method findNode.
private NodeAVLDisk findNode(PersistentStore store, int pos) {
NodeAVLDisk ret = null;
RowAVLDisk r = (RowAVLDisk) store.get(pos, false);
if (r != null) {
ret = (NodeAVLDisk) r.getNode(iId);
}
return ret;
}
use of org.hsqldb_voltpatches.RowAVLDisk in project voltdb by VoltDB.
the class NodeAVLDisk method setBalance.
public NodeAVL setBalance(PersistentStore store, int b) {
NodeAVLDisk node = this;
RowAVLDisk row = this.row;
if (!row.keepInMemory(true)) {
row = (RowAVLDisk) store.get(this.row, true);
node = (NodeAVLDisk) row.getNode(iId);
}
if (!row.isInMemory()) {
throw Error.runtimeError(ErrorCode.U_S0500, "NAVLD");
}
row.setNodesChanged();
node.iBalance = b;
row.keepInMemory(false);
return node;
}
Aggregations