question: private void sendDiscarded ( ServiceRegistrar reg , String [ ] curGroups ) { ServiceID srvcID = reg . getServiceID ( ) ; if ( curGroups == null ) { UnicastResponse resp = ( UnicastResponse ) registrars . get ( srvcID ) ; if ( resp == null ) return ; curGroups = resp . getGroups ( ) ; } if ( registrars . remove ( srvcID ) != null ) { regInfo . remove ( srvcID ) ; if ( ! listeners . isEmpty ( ) ) { addNotify ( ( ArrayList ) listeners . clone ( ) , mapRegToGroups ( reg , curGroups ) , DISCARDED ) ; } } }
target:  Convenience method that sends a discarded event containing only one registrar to all registered listeners. This method must be called from within a block that is synchronized on the registrars map.