long refreshAndGetTotal ( ) { long total = 0 ; for ( InputChannel channel : inputGate . getInputChannels ( ) . values ( ) ) { if ( channel instanceof RemoteInputChannel ) { RemoteInputChannel rc = ( RemoteInputChannel ) channel ; total += rc . unsynchronizedGetNumberOfQueuedBuffers ( ) ; } } return total ; }
Iterates over all input channels and collects the total number of queued buffers in a best - effort way .