in stresso/src/main/java/stresso/trie/NodeObserver.java [42:67]
public void process(TransactionBase tx, Bytes row, Column col) throws Exception {
final TypedTransactionBase ttx = Constants.TYPEL.wrap(tx);
Map<Column, Value> colVals =
ttx.get().row(row).columns(Constants.COUNT_SEEN_COL, Constants.COUNT_WAIT_COL);
final Integer childWait = colVals.get(Constants.COUNT_WAIT_COL).toInteger(0);
if (childWait > 0) {
Integer childSeen = colVals.get(Constants.COUNT_SEEN_COL).toInteger(0);
ttx.mutate().row(row).col(Constants.COUNT_SEEN_COL).set(childSeen + childWait);
ttx.mutate().row(row).col(Constants.COUNT_WAIT_COL).delete();
Node node = new Node(row.toString());
if (node.getLevel() > stopLevel) {
Node parent = node.getParent();
Integer parentWait =
ttx.get().row(parent.getRowId()).col(Constants.COUNT_WAIT_COL).toInteger(0);
ttx.mutate().row(parent.getRowId()).col(Constants.COUNT_WAIT_COL)
.set(parentWait + childWait);
}
}
}