@Override
    public boolean offer(final E e)
    {
        if (null == e)
        {
            throw new NullPointerException();
        }
        // local load of field to avoid repeated loads after volatile reads
        final E[] buffer = this.buffer;
        final long mask = this.mask;
        final long producerIndex = this.lpProducerIndex();

        if (producerIndex >= producerLimit &&
            !offerSlowPath(buffer, mask, producerIndex))
        {
            return false;
        }
        final long offset = calcElementOffset(producerIndex, mask);

        soElement(buffer, offset, e); // StoreStore
        soProducerIndex(producerIndex + 1); // ordered store -> atomic and ordered for size()
        return true;
    }
@ Override public boolean offer ( final E e ) { if ( null == e ) { throw new NullPointerException ( ) ; } final E [ ] buffer = this . buffer ; final long mask = this . mask ; final long producerIndex = this . lpProducerIndex ( ) ; if ( producerIndex >= producerLimit && ! offerSlowPath ( buffer , mask , producerIndex ) ) { return false ; } final long offset = calcElementOffset ( producerIndex , mask ) ; soElement ( buffer , offset , e ) ; soProducerIndex ( producerIndex + 1 ) ; return true ; }
{@inheritDoc}
<p>
This implementation is correct for single producer thread use only.