private final void lockRoot() {
        if (!Unsafe.compareAndSwapInt(this, LOCKSTATE, 0, WRITER)) {
          contendedLock(); // offload to separate method
        }
      }
private final void lockRoot()