protected void putToRingBuffer ( IQueueMessage < ID , DATA > msg ) throws QueueException . QueueIsFull { if ( msg == null ) { throw new NullPointerException ( "Supplied queue message is null!" ) ; } LOCK_PUT . lock ( ) ; try { if ( ! ringBuffer . tryPublishEvent ( ( event , _seq ) -> { event . set ( msg ) ; knownPublishedSeq = _seq > knownPublishedSeq ? _seq : knownPublishedSeq ; } ) ) { throw new QueueException . QueueIsFull ( getRingSize ( ) ) ; } } finally { LOCK_PUT . unlock ( ) ; } }
Put a message to the ring buffer .