@Override
    protected final long writeAcquire() {
        final long producerIndex = lpProducerIndex();
        final long producerLookAhead = lpLookAheadCache();
        final long producerOffset = offsetForIndex(bufferAddress, mask, messageSize, producerIndex);
        // verify next lookAheadStep messages are clear to write
        if (producerIndex >= producerLookAhead) {
            final long nextLookAhead = producerIndex + lookAheadStep;
            if (isReadReleased(offsetForIndex(nextLookAhead))) {
                spLookAheadCache(nextLookAhead);
            }
            // OK, can't look ahead, but maybe just next item is ready?
            else if (!isReadReleased(producerOffset)) {
                return EOF;
            }
        }
        soProducerIndex(producerIndex + 1); // StoreStore
//        writeAcquireState(producerOffset);
        // return offset for current producer index
        return producerOffset;
    }
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.

@param buff
@param capacity in messages, actual capacity will be
@param messageSize
jctools-channels/src/main/java/org/jctools/channels/spsc/SpscOffHeapFixedSizeRingBuffer.java