code: public ResourceRequestInfo getPendingRequestForAny(
      String host, ResourceType type) {
      Context c = getContext(type);
      for (ResourceRequestInfo req: c.anyHostRequests) {
        Set<String> excluded = req.getExcludeHosts();
        if (!excluded.contains(host)) {
          return req;
        }
      }
      return null;
    }
docs: Find a pending request that can run on any machine.
  @param host The host we are considering
  @param type the type of the request
  @return The resource request info for the matching request