@Override
    public boolean offer(final E e) {
        if (null == e) {
            throw new NullPointerException("Null is not a valid element");
        }

        // local load of field to avoid repeated loads after volatile reads
        final long[] lSequenceBuffer = sequenceBuffer;
        long currentProducerIndex;
        long seqOffset;

        while (true) {
            currentProducerIndex = lvProducerIndex(); // LoadLoad
            seqOffset = calcCircularLongElementOffset(currentProducerIndex, mask);
            final long seq = lvLongElement(lSequenceBuffer, seqOffset); // LoadLoad
            final long delta = seq - currentProducerIndex;

            if (delta == 0) {
                // this is expected if we see this first time around
                if (casProducerIndex(currentProducerIndex, currentProducerIndex + 1)) {
                    // Successful CAS: full barrier
                    break;
                }
                // failed cas, retry 1
            } else if (delta < 0) {
                // poll has not moved this value forward
                return false;
            }

            // another producer has moved the sequence by one, retry 2
        }

        // on 64bit(no compressed oops) JVM this is the same as seqOffset
        final long elementOffset = calcCircularRefElementOffset(currentProducerIndex, mask);
        UnsafeRefArrayAccess.spRefElement(buffer, elementOffset, e);

        // increment sequence by 1, the value expected by consumer
        // (seeing this value from a producer will lead to retry 2)
        // StoreStore
        soLongElement(lSequenceBuffer, seqOffset, currentProducerIndex + 1);

        return true;
    }
A Multi-Producer-Single-Consumer queue based on same algorithm used for {@link MpmcArrayQueue} but with the
appropriate weakening of constraints on offer. The trade off does not seem worth while compared to the simpler
{@link MpscArrayQueue}.

@param <E> type of the element stored in the {@link java.util.Queue}
jctools-experimental/src/main/java/org/jctools/queues/MpscSequencedArrayQueue.java