final LockResult ur = tryLockUpgradable(latch, locker, nanosTimeout); if (!ur.isHeld() || ur == OWNED_EXCLUSIVE) { return ur;
final LockResult ur = tryLockUpgradable(latch, locker, nanosTimeout); if (!ur.isHeld() || ur == OWNED_EXCLUSIVE) { return ur;
/** * Acquire an upgradable lock, with infinite timeout, but don't push the lock into the * owned lock stack. Returns the lock which was acquired, or null if already owned. */ final _Lock lockUpgradableNoPush(long indexId, byte[] key) throws LockFailureException { int hash = hash(indexId, key); _LockManager.LockHT ht = mManager.getLockHT(hash); _Lock lock; LockResult result; ht.acquireExclusive(); try { lock = ht.lockAccess(indexId, key, hash); result = lock.tryLockUpgradable(ht, this, -1); } finally { ht.releaseExclusive(); } if (!result.isHeld()) { throw failed(TYPE_UPGRADABLE, result, -1); } return result == LockResult.ACQUIRED ? lock : null; }
/** * Acquire an upgradable lock, with infinite timeout, but don't push the lock into the * owned lock stack. Returns the lock which was acquired, or null if already owned. */ final _Lock lockUpgradableNoPush(long indexId, byte[] key) throws LockFailureException { int hash = hash(indexId, key); _LockManager.LockHT ht = mManager.getLockHT(hash); _Lock lock; LockResult result; ht.acquireExclusive(); try { lock = ht.lockAccess(indexId, key, hash); result = lock.tryLockUpgradable(ht, this, -1); } finally { ht.releaseExclusive(); } if (!result.isHeld()) { throw failed(TYPE_UPGRADABLE, result, -1); } return result == LockResult.ACQUIRED ? lock : null; }
final LockResult ur = tryLockUpgradable(latch, locker, nanosTimeout); if (!ur.isHeld() || ur == OWNED_EXCLUSIVE) { return ur;
break lockNonEx; } else if (type == TYPE_UPGRADABLE) { result = lock.tryLockUpgradable(this, locker, nanosTimeout); break lockNonEx; } else {
break lockNonEx; } else if (type == TYPE_UPGRADABLE) { result = lock.tryLockUpgradable(this, locker, nanosTimeout); break lockNonEx; } else {
break lockNonEx; } else if (type == TYPE_UPGRADABLE) { result = lock.tryLockUpgradable(this, locker, nanosTimeout); break lockNonEx; } else {