code: public ResourceRequestInfo getPendingRequestOnHost(
      String host, ResourceType type) {
      Context c = getContext(type);
      List<ResourceRequestInfo> hostReqs = c.hostToPendingRequests.get(host);
      if (hostReqs != null) {
        // Returning the first element in the list makes the subsequent
        // call to Utilities.removeReference() very fast.
        return hostReqs.get(0);
      }
      return null;
    }
docs: Find a pending request that wants to run on a given host.
  @param host the host
  @param type the type of the request
  @return The resource request info for the matching request