/** * Returns true if a shared lock can be granted for the given key. Caller must hold the * node latch which contains the key. * * @param locker optional locker */ final boolean isAvailable(LockOwner locker, long indexId, byte[] key, int hash) { // Note that no LockHT latch is acquired. The current thread is not required to // immediately observe the activity of other threads acting upon the same lock. If // another thread has just acquired an exclusive lock, it must still acquire the node // latch before any changes can be made. return getLockHT(hash).isAvailable(locker, indexId, key, hash); }
/** * Returns true if a shared lock can be granted for the given key. Caller must hold the * node latch which contains the key. * * @param locker optional locker */ final boolean isAvailable(LockOwner locker, long indexId, byte[] key, int hash) { // Note that no LockHT latch is acquired. The current thread is not required to // immediately observe the activity of other threads acting upon the same lock. If // another thread has just acquired an exclusive lock, it must still acquire the node // latch before any changes can be made. return getLockHT(hash).isAvailable(locker, indexId, key, hash); }