public DiskRequest addNewRequest(DiskRequest request) throws InterruptedException {
  if (!isActive(request.time))   setStartingWeight(request.time);
  limiter.acquire(request.estimatedCost);
  pending.add(request);
  return request;
}

public DiskRequest addNewRequest ( DiskRequest request ) throws InterruptedException { if ( ! isActive ( request . time ) ) setStartingWeight ( request . time ) ; limiter . acquire ( request . estimatedCost ) ; pending . add ( request ) ; return request ; }
throws interruptedexception if we are being rate limited and this thread isinterrupted
