question: final boolean tryWriteLock ( ) { Thread current = Thread . currentThread ( ) ; int c = getState ( ) ; if ( c != 0 ) { int w = exclusiveCount ( c ) ; if ( w == 0 || current != getExclusiveOwnerThread ( ) ) return false ; if ( w == MAX_COUNT ) throw new Error ( "Maximum lock count exceeded" ) ; } if ( ! compareAndSetState ( c , c + 1 ) ) return false ; setExclusiveOwnerThread ( current ) ; return true ; }
target:  Performs tryLock for write, enabling barging in both modes. This is identical in effect to tryAcquire except for lack of calls to writerShouldBlock.