code: public E poll() {
  
          final int readLocation = this.consumerReadLocation;
  
          // sets the nextReadLocation my moving it on by 1, this may cause it it wrap back to the start.
          final int nextReadLocation = (readLocation + 1 == capacity) ? 0 : readLocation + 1;
  
          if (writeLocation == readLocation)
              return null;
  
          // purposely not volatile as the read memory barrier occurred when we read 'writeLocation'
          final E value = data[readLocation];
          setReadLocation(nextReadLocation);
  
          return value;
  
      }
docs: Retrieves and removes the head of this queue, waiting up to the
  specified wait time if necessary for an element to become available.
  
  @return the head of this queue, or <tt>null</tt> if the
  specified waiting time elapses before an element is available