// PERF: Cache if check to write is required.
boolean identityMapLocked = this.shouldCheckWriteLock && getParent().getIdentityMapAccessorInstance().acquireWriteLock();
boolean rootOfCloneRecursion = false;
if ((!identityMapLocked) && (this.objectsLockedForClone == null)) {//we may have locked all required objects already
// PERF: If a simple object just acquire a simple read-lock.
if (descriptor.shouldAcquireCascadedLocks()) {
this.objectsLockedForClone = getParent().getIdentityMapAccessorInstance().getWriteLockManager().acquireLocksForClone(original, descriptor, cacheKey.getKey(), getParent());
} else {
cacheKey.acquireReadLock();
}
rootOfCloneRecursion = true;