public boolean process ( T message ) { // If this batcher has been shutdown, do not accept any more messages if ( isShutDown ) { return false ; } try { queueSizeTracer . record ( queue . size ( ) ) ; } catch ( Throwable ignored ) { } if ( ! queue . offer ( message ) ) { numberDropped . incrementAndGet ( ) ; queueOverflowCounter . increment ( ) ; return false ; } numberAdded . incrementAndGet ( ) ; return true ; }
Processes the message sent to the batcher . This method just writes the message to the queue and returns immediately . If the queue is full the messages are dropped immediately and corresponding counter is incremented .