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;
}

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 ; }
keep private . call only when holding lock .
