docs: public synchronized void updateAndPersistSendWindow() throws SIResourceException
    {
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(this, tc, "updateAndPersistSendWindow" );
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      {
        SibTr.debug(tc, "definedSendWindow is: " + definedSendWindow 
            + " sendWindow is " +  sendWindow + " containsGuesses is " + containsGuesses
            + " totalMessages is " + totalMessages);
      }
  
      // If our current sendWindow is less than this new value
      // we can move to the new value straight away and send
      // any messages which were between the two
      if( definedSendWindow > sendWindow ) 
      {
        // If the stream containsGuesses we can't send
        // anything at the moment so we do the code
        // below in noGuessesInStream() instead
        if (!containsGuesses)
        {
          long oldSendWindow = sendWindow;
          sendWindow = definedSendWindow;  
          persistSendWindow(sendWindow, null); 
          // Send the messages up to the new send window
          // this will update firstMsgOutsideWindow
          sendMsgsInWindow(oldSendWindow, sendWindow);
        }
      } 
      else
      {
         // sendWindow is being reduced
         if ( definedSendWindow > totalMessages )
         {
           // sendWindow is being reduced but is bigger than 
           // totalMessages so we can just set it
           sendWindow = definedSendWindow;  
           persistSendWindow(sendWindow, null);    
         }
         else if ( totalMessages < sendWindow)
         {
           sendWindow = totalMessages;
           persistSendWindow(sendWindow, null); 
         }
      }
        
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "updateAndPersistSendWindow");
    }