public boolean writeSilence ( SIMPMessage m ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeSilence" , new Object [ ] { m } ) ; JsMessage jsMsg = m . getMessage ( ) ; // There may be Completed ticks after the Value, if so then // write these into the stream too long stamp = jsMsg . getGuaranteedValueValueTick ( ) ; long starts = jsMsg . getGuaranteedValueStartTick ( ) ; long ends = jsMsg . getGuaranteedValueEndTick ( ) ; if ( ends < stamp ) ends = stamp ; 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 ) { tr = oststream . writeCompletedRange ( tr ) ; long completedPrefix = oststream . getCompletedPrefix ( ) ; if ( completedPrefix > oack ) { oack = completedPrefix ; } // Only want to send Silence if we know it has been missed // because we have sent something beyond it if ( lastSent > ends ) sendSilence ( ends + 1 , completedPrefix ) ; // SIB0105 // Message silenced so reset the health state if ( blockedStreamAlarm != null ) blockedStreamAlarm . checkState ( false ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "writeSilence" ) ; setLastSent ( jsMsg . getGuaranteedValueEndTick ( ) ) ; return true ; }
This method uses a Value message to write Silence into the stream either because a message has been filtered out or because it has been rolled back