class Context {

  public void run(Runnable r) {
    Context previous = attach();
    try {
      r.run();
    } finally {
      detach(previous);
    }
  }

  private  Context(PersistentHashArrayMappedTrie<Key<?>, Object> keyValueEntries, int generation);
  private  Context(Context parent, PersistentHashArrayMappedTrie<Key<?>, Object> keyValueEntries);

}