boolean () { // We have read lock, if: // (a) This is write thread // AND // (b.1) Implicit read lock is enabled // OR // (b.2) Explicit write lock has been acquired. // OR // (b.3) Explicit write intent lock has been acquired return isWriteThread() && (isImplicitReadAllowed() || isWriteAcquired() || isWriteIntentLocked()); }