@Override
    public E poll()
    {
        final long consumerPosition = lvConsumerPosition();
        final int offset = calcElementOffset(consumerPosition, this.mask);
        final AtomicReferenceArray<E> buffer = this.buffer;
        E e;
        if ((e = buffer.get(offset)) != null)
        {
            //can be used a memory_order_relaxed set here, because the consumer position write release the buffer value
            buffer.lazySet(offset, null);
            //consumer position allows the producers to move the claim limit (aka reduce backpressure)
            //hence can be set only after the buffer slot release
            soConsumerPosition(consumerPosition + 1);
            return e;
        }
        else
        {
            return pollMaybeEmpty(buffer, offset, consumerPosition);
        }
    }
NOTE: This class was automatically generated by org.jctools.queues.atomic.JavaParsingAtomicArrayQueueGenerator
which can found in the jctools-build module. The original source file is MpscArrayQueue.java.
jctools-experimental/src/main/java/org/jctools/queues/atomic/MpscRelaxedAtomicArrayQueue.java