docs: public long waiting(long timeout, boolean modifyTimeout)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(this, tc, "waiting", new Object[] { new Long(timeout),  Boolean.valueOf(modifyTimeout) });
  
      boolean processGets = true;
      synchronized(this)
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "refilling: " + Boolean.valueOf(isRefilling) +
                          "doRefill: " + Boolean.valueOf(doRefill));
        if (isRefilling)
        {
          processGets = false;
          
          // A request came in while we were busy doing refills. Therfore we
          // record the timeout (if we dont have a longer one) in case we have to redrive
          // a new refill request when the current one is satisfied.
          if (timeout == LocalConsumerPoint.INFINITE_WAIT)
            refillTime = timeout;
          else if (timeout != LocalConsumerPoint.NO_WAIT)
          {
            // Work out when this request would have expired
            long expiryTime = System.currentTimeMillis() + timeout;
            
            // If we dont have a current refillTime that extends to the period of this request
            // then set the new refillTime
            if (refillTime != LocalConsumerPoint.INFINITE_WAIT && refillTime < expiryTime)
              refillTime = expiryTime;
          }
        }
        else
        {
          if (doRefill) // Has a refill been inititated
          {
            isRefilling = true;
            doRefill = false;
          }
        }        
      }
      
      if (processGets)
      {     
        try
        {
          long protocolTimeout;
          // Either modify the timeout with a roundTrip time or not.
          // But always convert the protocol time into a SIMP format
          // (from the LCP format)
          if (modifyTimeout)
          {
            if (timeout == LocalConsumerPoint.INFINITE_WAIT)
            { // no need to modify timeout
      
              // we are using a different constant for the protocol
              protocolTimeout = SIMPConstants.INFINITE_TIMEOUT;
            }
            else if (timeout == LocalConsumerPoint.NO_WAIT)
            {
              timeout = getRoundTripTime(); // the consumer needs to wait atleast
                                            // for this time
              protocolTimeout = 0L; // this ensures that the DME knows not to wait
            }
            else
            {
              long rtt = getRoundTripTime();
              protocolTimeout = timeout + rtt;
              timeout = protocolTimeout;
            }
          }
          else
          {
            if (timeout == LocalConsumerPoint.INFINITE_WAIT)
              protocolTimeout = SIMPConstants.INFINITE_TIMEOUT;
            else if (timeout == LocalConsumerPoint.NO_WAIT)
              protocolTimeout = 0L; // this ensures that the DME knows not to wait
            else
              protocolTimeout = timeout;
          }
          
          boolean callIssueGet = true;
          if (readAhead || protocolTimeout == SIMPConstants.INFINITE_TIMEOUT)
          {
            synchronized (this)
            {
              if (countOfOutstandingInfiniteTimeoutGets > 0)
              {
                callIssueGet = false; // already scheduled requests
              }
              else
              {
                if (keyGroup == null)
                {
    
                  // will issue get, so update counts within the synchronized block
                  if (protocolTimeout == SIMPConstants.INFINITE_TIMEOUT)
                  {
                    countOfOutstandingInfiniteTimeoutGets++;
    
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(tc, "readAhead change: countOfOutstandingInfiniteTimeoutGets++ " + countOfOutstandingInfiniteTimeoutGets);
                  }
                }
                // else do nothing, since gets issued on the key group don't count
                // towards
                // countOfOutstandingInfiniteTimeoutGets
              }
            }
            if (readAhead)
                tryPrefetching(); // call try prefetching since window may have
                                  // increased
          }
    
          if (callIssueGet)
          {
            AIStreamKey key;
            if (keyGroup == null)
              key = rcd.issueGet(criteria, protocolTimeout, this, this);
            else
              key = ((RemoteQPConsumerKeyGroup) keyGroup).issueGet(protocolTimeout, this);
           
            if (key == null)
            {
              // decrement the counts. this will be very rare!
              synchronized (this)
              {
                if ((keyGroup == null)
                    && (protocolTimeout == SIMPConstants.INFINITE_TIMEOUT))
                {
                  countOfOutstandingInfiniteTimeoutGets--;
                  
    
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(tc, "readAhead change: countOfOutstandingInfiniteTimeoutGets-- " + countOfOutstandingInfiniteTimeoutGets);
                }
              }
              // log and throw exception to consumer
              SIResourceException e = new SIResourceException(nls
                  .getFormattedMessage("ANYCAST_STREAM_UNAVAILABLE_CWSIP0481",
                      new Object[] { rcd.getDestName(),
                          rcd.getLocalisationUuid().toString() }, null));
              FFDCFilter.processException(e,
                  "com.ibm.ws.sib.processor.impl.RemoteQPConsumerKey.waiting",
                  "1:357:1.47.1.26", this);
              SibTr.exception(tc, e);
    
              consumerPoint.notifyException(e);
            }
          }
        }
        catch (SIResourceException e)
        {
          // FFDC
          FFDCFilter.processException(e,
              "com.ibm.ws.sib.processor.impl.RemoteQPConsumerKey.waiting",
              "1:369:1.47.1.26", this);
    
          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
            SibTr.exception(tc, e);
    
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "waiting", "SIErrorException");
          throw new SIErrorException(e);
        }
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(this, tc, "waiting", Long.valueOf(timeout));
  
      return timeout;
    }