question: private boolean tryQueueCurrentBuffer ( long elapsedWaiting ) { if ( currentBuffer . isEmpty ( ) ) return true ; if ( isOpen && neverPubQueue . size ( ) < neverPubCapacity ) { neverPubQueue . add ( currentBuffer ) ; totalQueuedRecords . addAndGet ( currentBuffer . sizeRecords ( ) ) ; totalQueuedBuffers . incrementAndGet ( ) ; onQueueBufferSuccess ( currentBuffer , elapsedWaiting ) ; currentBuffer = new RecordBuffer < > ( flow ) ; return true ; } else if ( elapsedWaiting > 0 ) { onQueueBufferTimeout ( currentBuffer , elapsedWaiting ) ; return false ; } else return false ; }
target:  Keep private. Call only when holding lock.