private boolean tryToFetchElement(int index) {
        // must release read locks before acquiring write lock
        final int readLocks = stateLock.releaseReadLocksAndAcquireWriteLock();
        try {
            return couldStillTurnUp(elements[index]) ? reallyTryToFetchElement(index) : true;
        } finally {
            stateLock.downgradeWriteLockToReadLocks(readLocks);
        }
    }
private boolean tryToFetchElement ( int index ) { final int readLocks = stateLock . releaseReadLocksAndAcquireWriteLock ( ) ; try { return couldStillTurnUp ( elements [ index ] ) ? reallyTryToFetchElement ( index ) : true ; } finally { stateLock . downgradeWriteLockToReadLocks ( readLocks ) ; } }
Attempt to retrieve the element at the specified index, using the provided {@link Retriever}.
This method will release all read locks held by this thread, then acquire a write lock.
It will then re-acquire the same number of read locks before exiting the method.

@param index the index of the key whose associated element is required
@return true if the element was found or has failed permanently, false otherwise