void deliverAsyncEvent ( final EntryEvent < K , V > _event ) { if ( asyncListenerByType . get ( _event . getEventType ( ) ) . isEmpty ( ) ) { return ; } List < Listener < K , V > > _listeners = new ArrayList < Listener < K , V > > ( asyncListenerByType . get ( _event . getEventType ( ) ) ) ; if ( _listeners . isEmpty ( ) ) { return ; } K key = _event . getKey ( ) ; synchronized ( getLockObject ( key ) ) { Queue < EntryEvent < K , V > > q = keyQueue . get ( key ) ; if ( q != null ) { q . add ( _event ) ; return ; } q = new LinkedList < EntryEvent < K , V > > ( ) ; keyQueue . put ( key , q ) ; } runAllListenersInParallel ( _event , _listeners ) ; }
If listeners are registered for this event type run the listeners or queue the event if already something is happening for this key .