/** * _Lock acquisition used by recovery. * * @param lock _Lock instance to insert, unless another already exists. The mIndexId, * mKey, and mHashCode fields must be set. */ final LockResult lockExclusive(_Lock lock, long nanosTimeout) throws LockFailureException { LockResult result = mManager.getLockHT(lock.mHashCode) .tryLockExclusive(this, lock, nanosTimeout); if (result.isHeld()) { return result; } throw failed(TYPE_EXCLUSIVE, result, nanosTimeout, lock.mHashCode); }
/** * Lock acquisition used by recovery. * * @param lock Lock instance to insert, unless another already exists. The mIndexId, * mKey, and mHashCode fields must be set. */ final LockResult lockExclusive(Lock lock, long nanosTimeout) throws LockFailureException { LockResult result = mManager.getLockHT(lock.mHashCode) .tryLockExclusive(this, lock, nanosTimeout); if (result.isHeld()) { return result; } throw failed(TYPE_EXCLUSIVE, result, nanosTimeout, lock.mHashCode); }
/** * Lock acquisition used by recovery. * * @param lock Lock instance to insert, unless another already exists. The mIndexId, * mKey, and mHashCode fields must be set. */ final LockResult lockExclusive(Lock lock, long nanosTimeout) throws LockFailureException { LockResult result = mManager.getLockHT(lock.mHashCode) .tryLockExclusive(this, lock, nanosTimeout); if (result.isHeld()) { return result; } throw failed(TYPE_EXCLUSIVE, result, nanosTimeout); }
/** * Lock acquisition used by recovery. * * @param lock Lock instance to insert, unless another already exists. The mIndexId, * mKey, and mHashCode fields must be set. */ final LockResult lockExclusive(Lock lock, long nanosTimeout) throws LockFailureException { LockResult result = mManager.getLockHT(lock.mHashCode) .tryLockExclusive(this, lock, nanosTimeout); if (result.isHeld()) { return result; } throw failed(TYPE_EXCLUSIVE, result, nanosTimeout); }
/** * _Lock acquisition used by recovery. * * @param lock _Lock instance to insert, unless another already exists. The mIndexId, * mKey, and mHashCode fields must be set. */ final LockResult lockExclusive(_Lock lock, long nanosTimeout) throws LockFailureException { LockResult result = mManager.getLockHT(lock.mHashCode) .tryLockExclusive(this, lock, nanosTimeout); if (result.isHeld()) { return result; } throw failed(TYPE_EXCLUSIVE, result, nanosTimeout); }
final Locker lockExclusiveLocal(long indexId, byte[] key, int hash) throws LockFailureException { Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_EXCLUSIVE, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_EXCLUSIVE, result, mDefaultTimeoutNanos, hash); }
final Locker lockExclusiveLocal(long indexId, byte[] key, int hash) throws LockFailureException { Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_EXCLUSIVE, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_EXCLUSIVE, result, mDefaultTimeoutNanos); }
final _Locker lockExclusiveLocal(long indexId, byte[] key, int hash) throws LockFailureException { _Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_EXCLUSIVE, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_EXCLUSIVE, result, mDefaultTimeoutNanos); }
final Locker lockSharedLocal(long indexId, byte[] key, int hash) throws LockFailureException { Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_SHARED, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_SHARED, result, mDefaultTimeoutNanos); }
final Locker lockExclusiveLocal(long indexId, byte[] key, int hash) throws LockFailureException { Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_EXCLUSIVE, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_EXCLUSIVE, result, mDefaultTimeoutNanos); }
final _Locker lockSharedLocal(long indexId, byte[] key, int hash) throws LockFailureException { _Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_SHARED, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_SHARED, result, mDefaultTimeoutNanos, hash); }
final Locker lockSharedLocal(long indexId, byte[] key, int hash) throws LockFailureException { Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_SHARED, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_SHARED, result, mDefaultTimeoutNanos); }
/** * @param lockType TYPE_SHARED, TYPE_UPGRADABLE, or TYPE_EXCLUSIVE */ final LockResult lock(int lockType, long indexId, byte[] key, int hash, long nanosTimeout) throws LockFailureException { LockResult result = manager().getLockHT(hash) .tryLock(lockType, this, indexId, key, hash, nanosTimeout); if (result.isHeld()) { return result; } throw failed(lockType, result, nanosTimeout); }
final _Locker lockSharedLocal(long indexId, byte[] key, int hash) throws LockFailureException { _Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_SHARED, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_SHARED, result, mDefaultTimeoutNanos); }
final _Locker lockExclusiveLocal(long indexId, byte[] key, int hash) throws LockFailureException { _Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_EXCLUSIVE, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_EXCLUSIVE, result, mDefaultTimeoutNanos); }
/** * @param lockType TYPE_SHARED, TYPE_UPGRADABLE, or TYPE_EXCLUSIVE */ final LockResult lock(int lockType, long indexId, byte[] key, int hash, long nanosTimeout) throws LockFailureException { LockResult result = manager().getLockHT(hash) .tryLock(lockType, this, indexId, key, hash, nanosTimeout); if (result.isHeld()) { return result; } throw failed(lockType, result, nanosTimeout); }
/** * @param lockType TYPE_SHARED, TYPE_UPGRADABLE, or TYPE_EXCLUSIVE */ final LockResult lock(int lockType, long indexId, byte[] key, int hash, long nanosTimeout) throws LockFailureException { LockResult result = manager().getLockHT(hash) .tryLock(lockType, this, indexId, key, hash, nanosTimeout); if (result.isHeld()) { return result; } throw failed(lockType, result, nanosTimeout); }
final Locker lockSharedLocal(long indexId, byte[] key, int hash) throws LockFailureException { Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_SHARED, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_SHARED, result, mDefaultTimeoutNanos, hash); }
final _Locker lockExclusiveLocal(long indexId, byte[] key, int hash) throws LockFailureException { _Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_EXCLUSIVE, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_EXCLUSIVE, result, mDefaultTimeoutNanos, hash); }
final _Locker lockSharedLocal(long indexId, byte[] key, int hash) throws LockFailureException { _Locker locker = localLocker(); LockResult result = getLockHT(hash) .tryLock(TYPE_SHARED, locker, indexId, key, hash, mDefaultTimeoutNanos); if (result.isHeld()) { return locker; } throw locker.failed(TYPE_SHARED, result, mDefaultTimeoutNanos); }