org.eclipse.edje/src/main/java/org/eclipse/edje/util/FixedLengthFIFOQueue.java
@Override
	public T poll() {
		// NOTE: read do not need writeMonitor
		synchronized (buffer) {
			while (ptrBegin == ptrEnd) {
				try {
					buffer.wait();
				} catch (InterruptedException e) {
					throw new AssertionError(e);
				}
			}
			@SuppressWarnings("unchecked")
			T data = (T) buffer[ptrBegin];
			buffer[ptrBegin] = null;
			ptrBegin = (ptrBegin + 1) % buffer.length;
			return data;
		}
	}
/**
	 * Returns the oldest data or waits for it. This method blocks until data is
	 * available.
	 *
	 * @return the oldest data added to the FIFO
	 */
Returns the oldest data or waits for it. This method blocks until data is
available.

@return the oldest data added to the FIFO
Returns the oldest data or waits for it . This method blocks until data is available . @return the oldest data added to the FIFO
@Override
	public T poll() {
		synchronized (buffer) {
			while (ptrBegin == ptrEnd) {
				try {
					buffer.wait();
				} catch (InterruptedException e) {
					throw new AssertionError(e);
				}
			}
			@SuppressWarnings("unchecked")
			T data = (T) buffer[ptrBegin];
			buffer[ptrBegin] = null;
			ptrBegin = (ptrBegin + 1) % buffer.length;
			return data;
		}
	}
@ Override public T poll ( ) { synchronized ( buffer ) { while ( ptrBegin == ptrEnd ) { try { buffer . wait ( ) ; } catch ( InterruptedException e ) { throw new AssertionError ( e ) ; } } @ SuppressWarnings ( "unchecked" ) T data = ( T ) buffer [ ptrBegin ] ; buffer [ ptrBegin ] = null ; ptrBegin = ( ptrBegin + 1 ) % buffer . length ; return data ; } }
Returns the oldest data or waits for it.
Returns the oldest data or waits for it .
// NOTE: read do not need writeMonitor