protected void mergeProducer ( Producer inner , Producer outer ) { if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Merging Producer = " + inner + " into Producer = " + outer ) ; } // NOTE: For now, assumption is that inner Producer is equivalent to the outer // and results from instrumentation rules being triggered multiple times // for the same message. // Merge correlation - just replace for now if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Merging Producers: replacing correlation ids (" + outer . getCorrelationIds ( ) + ") with (" + inner . getCorrelationIds ( ) + ")" ) ; } outer . setCorrelationIds ( inner . getCorrelationIds ( ) ) ; // Remove the inner Producer from the child nodes of the outer outer . getNodes ( ) . remove ( inner ) ; }
This method merges an inner Producer node information into its containing Producer node before removing the inner node .