public Queue < T > poll ( int maxCount ) { synchronized ( this . contents ) { Exceptions . checkNotClosed ( this . closed , this ) ; Preconditions . checkState ( this . pendingTake == null , "Cannot call poll() when there is a pending take() request." ) ; return fetch ( maxCount ) ; } }
Returns the next items from the queue if any .