void sweepMarkedProxies ( List topicSpaces , List topics , Transaction transaction , boolean okToForward ) throws SIResourceException , SIException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sweepMarkedProxies" , new Object [ ] { topicSpaces , topics , transaction , new Boolean ( okToForward ) } ) ; // Get the list of proxies for this Neighbour final Enumeration enu = iProxies . elements ( ) ; // Cycle through each of the proxies while ( enu . hasMoreElements ( ) ) { final MESubscription sub = ( MESubscription ) enu . nextElement ( ) ; // If the subscription is marked, then remove it if ( sub . isMarked ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Subscription " + sub + " being removed" ) ; // Remove the proxy from the list. proxyDeregistered ( sub . getTopicSpaceUuid ( ) , sub . getTopic ( ) , transaction ) ; // Remove this Subscription from the // match space and the item stream on which they are // stored. final boolean proxyDeleted = iNeighbours . deleteProxy ( iDestinationManager . getDestinationInternal ( sub . getTopicSpaceUuid ( ) , false ) , sub , this , sub . getTopicSpaceUuid ( ) , sub . getTopic ( ) , true , false ) ; // Generate the key to remove the subscription from. final String key = BusGroup . subscriptionKey ( sub . getTopicSpaceUuid ( ) , sub . getTopic ( ) ) ; // Remove the proxy from the list iProxies . remove ( key ) ; // Add the details to the list of topics/topicSpaces to be deleted if ( okToForward && proxyDeleted ) { topics . add ( sub . getTopic ( ) ) ; topicSpaces . add ( sub . getTopicSpaceUuid ( ) ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "sweepMarkedProxies" ) ; }
Removes all Subscriptions that are no longer registered