this method is not thread safe it therefore only provides and approximation of the size , the size will be corrected if nothing was added or removed from the queue at the time it was called concode_field_sep int xproducerWriteLocation concode_elem_sep DataLocator<E> dataLocator concode_elem_sep RingIndex ringIndex concode_elem_sep int consumerReadLocation concode_field_sep int blockForReadSpace concode_elem_sep int blockForReadSpace concode_elem_sep void blockAtAdd concode_elem_sep boolean blockAtAdd concode_elem_sep int getNextWriteLocationThrowIfFull concode_elem_sep void setReadLocation concode_elem_sep void clear concode_elem_sep boolean isEmpty concode_elem_sep void setWriteLocation concode_elem_sep int remainingCapacity concode_elem_sep int blockForWriteSpaceInterruptibly concode_elem_sep int blockForWriteSpace concode_elem_sep int blockForReadSpaceThrowNoSuchElementException concode_elem_sep void blockAtTake concode_elem_sep boolean blockAtTake
int function ( ) { int loc0 = ringIndex . getReadLocation ( ) ; int loc1 = ringIndex . getWriterLocation ( ) ; if ( loc1 < loc0 ) loc1 += dataLocator . getCapacity ( ) ; return loc1 - loc0 ; }