public void writeSilence ( ControlSilence m ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeSilence" , new Object [ ] { m } ) ; boolean sendMessage = false ; // to use in messages sent downstream long completedPrefix ; // Construct a TickRange from the Silence message long starts = m . getStartTick ( ) ; long ends = m . getEndTick ( ) ; boolean requestedOnly = m . getRequestedOnly ( ) ; TickRange tr = new TickRange ( TickRange . Completed , starts , ends ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "writeSilence from: " + starts + " to " + ends + " on Stream " + streamID ) ; } synchronized ( this ) { if ( requestedOnly ) { // Only send this Silence message if there are some ticks in // its tick range which are in Requested state in the stream if ( oststream . containsRequested ( tr ) == false ) sendMessage = false ; } // Write the range of Completed ticks to the stream and // get the resultant maximal Completed range tr = oststream . writeCompletedRange ( tr ) ; if ( oststream . getCompletedPrefix ( ) > oack ) { oack = oststream . getCompletedPrefix ( ) ; } completedPrefix = oststream . getCompletedPrefix ( ) ; } // end synchronized if ( sendMessage ) { // send silence message corresponding to tr to downstream cellule // to target cellule try { downControl . sendSilenceMessage ( tr . startstamp , tr . endstamp , completedPrefix , requestedOnly , priority , reliability , streamID ) ; } catch ( SIResourceException e ) { // FFDC FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.gd.InternalOutputStream.writeSilence" , "1:788:1.83.1.1" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "writeSilence" , e ) ; throw e ; } setLastSent ( tr . endstamp ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "writeSilence" , Boolean . valueOf ( sendMessage ) ) ; }
This method writes the ticks in a Silence message into the stream It is called when a Silence message arrives from another ME If the RequestedOnly flag in the message is set then the message is only sent on to downstream MEs if they have previously requested it . Otherwise it is always sent .