private void checkByteBuffer() {
        if (!buffer.isDirect()) {
            throw new IllegalArgumentException("Channels only work with direct or memory mapped buffers");
        }
    }
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.

@param buffer
@param requestedCapacity
jctools-channels/src/main/java/org/jctools/channels/mpsc/MpscChannel.java