Search in sources :

Example 6 with RowAVL

use of org.hsqldb_voltpatches.RowAVL in project voltdb by VoltDB.

the class RowStoreAVLDisk method setAccessor.

public void setAccessor(Index key, int accessor) {
    CachedObject object = get(accessor, false);
    if (object != null) {
        NodeAVL node = ((RowAVL) object).getNode(key.getPosition());
        object = node;
    }
    setAccessor(key, object);
}
Also used : NodeAVL(org.hsqldb_voltpatches.index.NodeAVL) RowAVL(org.hsqldb_voltpatches.RowAVL)

Example 7 with RowAVL

use of org.hsqldb_voltpatches.RowAVL in project voltdb by VoltDB.

the class RowStoreAVLHybrid method getNewCachedObject.

public CachedObject getNewCachedObject(Session session, Object object) {
    if (isCached) {
        Row row = new RowAVLDisk(table, (Object[]) object);
        add(row);
        if (isTempTable) {
            RowAction.addAction(session, RowAction.ACTION_INSERT, (Table) table, row);
        }
        return row;
    } else {
        memoryRowCount++;
        if (useCache && memoryRowCount > maxMemoryRowCount) {
            changeToDiskTable();
            return getNewCachedObject(session, object);
        }
        Row row = new RowAVL(table, (Object[]) object);
        int id = rowIdSequence++;
        row.setPos(id);
        rowIdMap.put(id, row);
        if (isTempTable) {
            RowAction.addAction(session, RowAction.ACTION_INSERT, (Table) table, row);
        }
        return row;
    }
}
Also used : RowAVLDisk(org.hsqldb_voltpatches.RowAVLDisk) Row(org.hsqldb_voltpatches.Row) RowAVL(org.hsqldb_voltpatches.RowAVL)

Aggregations

RowAVL (org.hsqldb_voltpatches.RowAVL)7 Row (org.hsqldb_voltpatches.Row)5 NodeAVL (org.hsqldb_voltpatches.index.NodeAVL)4 RowIterator (org.hsqldb_voltpatches.navigator.RowIterator)2 HsqlException (org.hsqldb_voltpatches.HsqlException)1 RowAVLDisk (org.hsqldb_voltpatches.RowAVLDisk)1