private boolean isFull ( final long producerPosition ) { final long consumerPosition = lvConsumerPosition ( ) ; final long producerLimit = consumerPosition + this . cycleLength ; if ( producerPosition < producerLimit ) { soProducerLimit ( producerLimit ) ; return false ; } else { return true ; } }
Given the nature of getAndAdd progress on producerPosition and given the potential risk for over claiming it is quite possible for this method to report a queue which is not full as full .