public synchronized long getNumberOfRequestsInState(int requiredState)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getNumberOfRequestsInState", Integer.valueOf(requiredState));

    //Count the number of tick range objects that are in the
    //specified state
    long requestCount=0;

    // Initial range in stream is always completed Range
    stream.setCursor(0);
    // skip this and move to next range
    stream.getNext();
    // Get the first TickRange after completed range and move cursor to the next one
    TickRange tr = stream.getNext();
    // Iterate until we reach final Unknown range
    while (tr.endstamp < RangeList.INFINITY)
    {
      if((tr.type == requiredState) )
      {
        requestCount++;
      }
      tr = stream.getNext();
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getNumberOfRequestsInState", Long.valueOf(requestCount));
    return requestCount;
  }
public synchronized long getNumberOfRequestsInState ( int requiredState ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getNumberOfRequestsInState" , Integer . valueOf ( requiredState ) ) ; long requestCount = 0 ; stream . setCursor ( 0 ) ; stream . getNext ( ) ; TickRange tr = stream . getNext ( ) ; while ( tr . endstamp < RangeList . INFINITY ) { if ( ( tr . type == requiredState ) ) { requestCount ++ ; } tr = stream . getNext ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getNumberOfRequestsInState" , Long . valueOf ( requestCount ) ) ; return requestCount ; }
Counts the number of requests that have been completed since reboot
@return
@author tpm