protected IQueueMessage<ID, DATA> takeFromRingBuffer() {
        LOCK_TAKE.lock();
        try {
            long l = consumedSeq.get() + 1;
            if (l <= knownPublishedSeq) {
                try {
                    Event<ID, DATA> eventHolder = ringBuffer.get(l);
                    try {
                        return eventHolder.get();
                    } finally {
                        eventHolder.set(null);
                    }
                } finally {
                    consumedSeq.incrementAndGet();
                }
            } else {
                knownPublishedSeq = ringBuffer.getCursor();
            }
            return null;
        } finally {
            LOCK_TAKE.unlock();
        }
    }
protected IQueueMessage < ID , DATA > takeFromRingBuffer ( ) { LOCK_TAKE . lock ( ) ; try { long l = consumedSeq . get ( ) + 1 ; if ( l <= knownPublishedSeq ) { try { Event < ID , DATA > eventHolder = ringBuffer . get ( l ) ; try { return eventHolder . get ( ) ; } finally { eventHolder . set ( null ) ; } } finally { consumedSeq . incrementAndGet ( ) ; } } else { knownPublishedSeq = ringBuffer . getCursor ( ) ; } return null ; } finally { LOCK_TAKE . unlock ( ) ; } }
Takes a message from the ring buffer.

@return the available message or {@code null} if the ring buffer is empty