public void load()

in stresso/src/main/java/stresso/trie/NumberLoader.java [51:73]


  public void load(TransactionBase tx, Context context) throws Exception {

    if (nodeSize == null) {
      nodeSize = context.getAppConfiguration().getInt(Constants.NODE_SIZE_PROP);
      checkArgument((nodeSize <= 64) && ((64 % nodeSize) == 0), "nodeSize must be divisor of 64");
    }
    int level = 64 / nodeSize;

    TypedTransactionBase ttx = Constants.TYPEL.wrap(tx);

    String rowId = new Node(number, level, nodeSize).getRowId();

    Map<Column, Value> colVals =
        ttx.get().row(rowId).columns(Constants.COUNT_SEEN_COL, Constants.COUNT_WAIT_COL);

    Integer seen = colVals.get(Constants.COUNT_SEEN_COL).toInteger(0);
    if (seen == 0) {
      Integer wait = colVals.get(Constants.COUNT_WAIT_COL).toInteger(0);
      if (wait == 0) {
        ttx.mutate().row(rowId).col(Constants.COUNT_WAIT_COL).set(1);
      }
    }
  }