question: private RecordBuffer < R > tryTake ( long elapsedWaiting ) { RecordBuffer < R > result = null ; if ( ! retryQueue . isEmpty ( ) ) { result = retryQueue . poll ( ) ; } else { result = neverPubQueue . poll ( ) ; } if ( result != null ) { return onTakeSuccess ( result , elapsedWaiting ) ; } else if ( elapsedWaiting > 0 ) { return onTakeTimeout ( elapsedWaiting ) ; } else return null ; }
target:  Keep private. Call only when holding lock.