public Copyable getVersion(Transaction me, ContentionManager manager) {
    while (true) {
      if (me != null && me.getStatus() == Status.ABORTED) {
        throw new AbortedException();
      }
      switch (writer.getStatus()) {
        case ACTIVE:
          if (manager == null) {
            throw new PanicException("Transactional/Non-Tranactional race");
          }
          manager.resolveConflict(me, writer);
          continue;
        case COMMITTED:
          return newVersion;
        case ABORTED:
          return oldVersion;
        default:
          throw new PanicException("Unexpected transaction state: " + writer.getStatus());
      }
    }
  }