question: private void elideEvents ( ) { if ( ! s_eventElission ) { return ; } final Iterator < QuorumStateChangeEvent > events = queue . iterator ( ) ; QuorumStateChangeEvent uce = null ; QuorumStateChangeEvent dce = null ; QuorumStateChangeEvent add = null ; while ( events . hasNext ( ) ) { final QuorumStateChangeEvent tst = events . next ( ) ; if ( tst . getEventType ( ) == QuorumStateChangeEventEnum . PIPELINE_UPSTREAM_CHANGE ) { if ( uce != null ) { if ( log . isDebugEnabled ( ) ) log . debug ( "Elission removal of: " + uce ) ; queue . remove ( uce ) ; } uce = tst ; } else if ( tst . getEventType ( ) == QuorumStateChangeEventEnum . PIPELINE_CHANGE ) { if ( dce != null ) { tst . getDownstreamOldAndNew ( ) [ 0 ] = dce . getDownstreamOldAndNew ( ) [ 0 ] ; if ( log . isDebugEnabled ( ) ) log . debug ( "Elission removal of: " + dce ) ; queue . remove ( dce ) ; } dce = tst ; } else if ( tst . getEventType ( ) == QuorumStateChangeEventEnum . PIPELINE_ADD ) { add = tst ; } else if ( tst . getEventType ( ) == QuorumStateChangeEventEnum . PIPELINE_REMOVE ) { if ( add != null ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Elission removal of: " + add ) ; log . debug ( "Elission removal of: " + tst ) ; } queue . remove ( add ) ; queue . remove ( tst ) ; add = null ; } if ( dce != null ) { if ( log . isDebugEnabled ( ) ) log . debug ( "Elission removal of: " + dce ) ; queue . remove ( dce ) ; dce = null ; } if ( uce != null ) { if ( log . isDebugEnabled ( ) ) log . debug ( "Elission removal of: " + uce ) ; queue . remove ( uce ) ; uce = null ; } } } }
target:  Event elission endeavours to ensure that events processed represent current state change. This is best explained with an example from its original usage in processing graphic events.  Whilst a "button click" is a singular event and all button clicks should be processed, a "mouse move" event could be elided with the next "mouse move" event.  Thus the move events  (L1 -> L2) and (L2 -> L3) would elide to a single (L1 -> L3). In HA RMI calls can trigger event processing, whilst other threads monitor state changes - such as open sockets.  Without elission, monitoring threads will observe unnecessary transitional state changes.  HOWEVER, there remains a problem with this pattern of synchronization.