public boolean writeValue(SIMPMessage m) throws SIResourceException
    {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "writeValue", new Object[] { m });

        TickRange tr = null;

        long msgStoreId = AbstractItem.NO_ID;
        try
        {
            if (m.isInStore())
                msgStoreId = m.getID();
        } catch (MessageStoreException e)
        {
            // FFDC
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.gd.InternalOutputStream.writeValue",
                                        "1:513:1.83.1.1",
                                        this);

            SibTr.exception(tc, e);

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "writeValue", e);

            throw new SIResourceException(e);
        }

        JsMessage jsMsg = m.getMessage();
        long stamp = jsMsg.getGuaranteedValueValueTick();

        // should a Value message be sent downstream
        // this is the return value of this method
        boolean sendMessage = true;

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        {
            SibTr.debug(tc, "writeValue at: " + stamp + " on Stream " + streamID);
        }
        if (stamp > lastSent)
        {
            totalMessagesSent++;
            timeLastMsgSent = System.currentTimeMillis();
        }

        synchronized (this)
        {
            // If message is before completedPrefix we ignore it and
            // return false
            if (stamp > oststream.getCompletedPrefix())
            {
                if (jsMsg.getGuaranteedValueRequestedOnly())
                {
                    // Only send this Value message if its tick is in 
                    // Requested state in the stream 
                    if (oststream.isRequested(stamp) == false)
                        sendMessage = false;
                }

                // write into stream
                tr = TickRange.newValueTick(stamp, null, msgStoreId);

                oststream.writeRange(tr);

                // SIB0105
                // Message committed so reset the health state
                if (sendMessage && blockedStreamAlarm != null)
                    blockedStreamAlarm.checkState(false);
            }
            else
            {
                sendMessage = false;
            }

        } // end synchronized

        if (sendMessage)
            setLastSent(jsMsg.getGuaranteedValueEndTick());

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "writeValue", Boolean.valueOf(sendMessage));

        return sendMessage;

    }
public boolean writeValue ( SIMPMessage m ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeValue" , new Object [ ] { m } ) ; TickRange tr = null ; long msgStoreId = AbstractItem . NO_ID ; try { if ( m . isInStore ( ) ) msgStoreId = m . getID ( ) ; } catch ( MessageStoreException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.gd.InternalOutputStream.writeValue" , "1:513:1.83.1.1" , this ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "writeValue" , e ) ; throw new SIResourceException ( e ) ; } JsMessage jsMsg = m . getMessage ( ) ; long stamp = jsMsg . getGuaranteedValueValueTick ( ) ; boolean sendMessage = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "writeValue at: " + stamp + " on Stream " + streamID ) ; } if ( stamp > lastSent ) { totalMessagesSent ++ ; timeLastMsgSent = System . currentTimeMillis ( ) ; } synchronized ( this ) { if ( stamp > oststream . getCompletedPrefix ( ) ) { if ( jsMsg . getGuaranteedValueRequestedOnly ( ) ) { if ( oststream . isRequested ( stamp ) == false ) sendMessage = false ; } tr = TickRange . newValueTick ( stamp , null , msgStoreId ) ; oststream . writeRange ( tr ) ; if ( sendMessage && blockedStreamAlarm != null ) blockedStreamAlarm . checkState ( false ) ; } else { sendMessage = false ; } } if ( sendMessage ) setLastSent ( jsMsg . getGuaranteedValueEndTick ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "writeValue" , Boolean . valueOf ( sendMessage ) ) ; return sendMessage ; }
This method uses a Value message to write a Value tick
into the stream.
It is called at postCommit time.

@param m The value message to write to the stream

@return boolean true if the message can be sent downstream
message is not sent if it has the RequestedOnly
flag set and its tick in the stream is not in
the Requested state