docs: public void setLastApplied(long index) {
      // Query callbacks for this session are added to the indexQueries map to be executed once the required index
      // for the query is reached. For each increment of the index, trigger query callbacks that are dependent
      // on the specific index.
      for (long i = lastApplied + 1; i <= index; i++) {
        lastApplied = i;
        List<Runnable> queries = this.indexQueries.remove(lastApplied);
        if (queries != null) {
          for (Runnable query : queries) {
            query.run();
          }
        }
      }
    }