public void sendDownTree ( SIBUuid8 [ ] targets , int priority , AbstractMessage cMsg ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendDownTree" , new Object [ ] { this , cMsg , Integer . valueOf ( priority ) , targets } ) ; // Select a set of connections, then annotate the message. int length = targets . length ; //the unique list of connections MPConnection [ ] send = new MPConnection [ length ] ; int [ ] cCount = new int [ length ] ; int numSendConnections = 0 ; next : for ( int i = 0 ; i < length ; i ++ ) { SIBUuid8 targetMEUuid = targets [ i ] ; MPConnection firstChoice = findMPConnection ( targetMEUuid ) ; // Minimal comms trace of the message we're trying to send if ( TraceComponent . isAnyTracingEnabled ( ) ) { MECommsTrc . traceMessage ( tc , _messageProcessor , cMsg . getGuaranteedTargetMessagingEngineUUID ( ) , MECommsTrc . OP_SEND , firstChoice , cMsg ) ; } if ( firstChoice != null ) { // Keep track of the set of unique connections for sending below int j = 0 ; //loop through send until we find the next unused slot for ( j = 0 ; ( j < i ) && ( send [ j ] != null ) ; j ++ ) { //if we have seen the selected connection before, start again if ( send [ j ] . equals ( firstChoice ) ) { cCount [ j ] ++ ; continue next ; } } if ( j + 1 > numSendConnections ) numSendConnections = ( j + 1 ) ; //store the select connection in the chosen send slot send [ j ] = firstChoice ; cCount [ j ] ++ ; } } for ( int i = 0 ; i < numSendConnections ; i ++ ) { if ( send [ i ] != null ) send [ i ] . send ( cMsg , priority ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "sendDownTree" ) ; }
Send a control message to a list of MEs