code: public boolean offer(E value) {
  
          // non volatile read  ( which is quicker )
          final int writeLocation = this.producerWriteLocation;
  
          // sets the nextWriteLocation my moving it on by 1, this may cause it it wrap back to the start.
          final int nextWriteLocation = (writeLocation + 1 == capacity) ? 0 : writeLocation + 1;
  
          if (nextWriteLocation == capacity) {
  
              if (readLocation == 0)
                  return false;
  
          } else if (nextWriteLocation == readLocation)
              return false;
  
          // purposely not volatile see the comment below
          data[writeLocation] = value;
  
          setWriteLocation(nextWriteLocation);
          return true;
      }
docs: {@inheritDoc}