Set the rate limit of specified domain acceleration.

@param request The request containing all of the options related to the update request.
@return Result of the setDomainLimitRate operation returned by the service.
978190
public SetDomainLimitRateResponse setDomainLimitRate(SetDomainLimitRateRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");
        InternalRequest internalRequest = createRequest(request, HttpMethodName.PUT, DOMAIN, request.getDomain(), "config");
        internalRequest.addParameter("limitRate","");
        this.attachRequestToBody(request, internalRequest);
        return invokeHttpClient(internalRequest, SetDomainLimitRateResponse.class);
    }
861940
public SettingsPack downloadRateLimit(int value) {
        sp.set_int(settings_pack.int_types.download_rate_limit.swigValue(), value);
        return this;
    }
1181107
public ExecutionResult request(Request request) {
        // Schema
        GraphQLSchema schema = schemaService.getSchema();
        // Execution
        return graphQLService.execute(
                schema,
                request.getQuery(),
                request.getVariables(),
                request.getOperationName(),
                true
        );
    }
1348574
private void addQueryParams(final Request request) {
        if (absoluteDateCreated != null) {
            request.addQueryParam("DateCreated", absoluteDateCreated.toString(Request.QUERY_STRING_DATE_FORMAT));
        } else if (rangeDateCreated != null) {
            request.addQueryDateRange("DateCreated", rangeDateCreated);
        }

        if (absoluteDateUpdated != null) {
            request.addQueryParam("DateUpdated", absoluteDateUpdated.toString(Request.QUERY_STRING_DATE_FORMAT));
        } else if (rangeDateUpdated != null) {
            request.addQueryDateRange("DateUpdated", rangeDateUpdated);
        }

        if (friendlyName != null) {
            request.addQueryParam("FriendlyName", friendlyName);
        }

        if (status != null) {
            request.addQueryParam("Status", status.toString());
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
1208318
private void addQueryParams(final Request request) {
        if (absoluteDateCreated != null) {
            request.addQueryParam("DateCreated", absoluteDateCreated.toString(Request.QUERY_STRING_DATE_FORMAT));
        } else if (rangeDateCreated != null) {
            request.addQueryDateRange("DateCreated", rangeDateCreated);
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
115559
synchronized void setLimits(int txnsPerSec, int maxOutstanding) {
        m_autoTune = false;
        /*
         * If the rate limit is some reasonably low value then go through the effort
         * of rate limiting
         */
        if (txnsPerSec < Integer.MAX_VALUE / 2) {
            m_doesAnyTuning = true;
        }
        m_targetTxnsPerSecond = txnsPerSec;
        m_maxOutstandingTxns = maxOutstanding;
        m_outstandingTxnsSemaphore.drainPermits();
        m_outstandingTxnsSemaphore.release(maxOutstanding);
    }
595638
public DisableDomainResponse disableDomain(DisableDomainRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");
        InternalRequest internalRequest = createRequest(request, HttpMethodName.POST, DOMAIN, request.getDomain());
        internalRequest.addParameter("disable", "");
        return invokeHttpClient(internalRequest, DisableDomainResponse.class);
    }
7848
private void addQueryParams(final Request request) {
        if (absoluteDateCreated != null) {
            request.addQueryParam("DateCreated", absoluteDateCreated.toString(Request.QUERY_STRING_DATE_TIME_FORMAT));
        } else if (rangeDateCreated != null) {
            request.addQueryDateTimeRange("DateCreated", rangeDateCreated);
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
949456
public Settings buildSettings(SettingsBuildingRequest request) {
        SettingsBuildingResult result;
        try {
            SettingsBuilder builder = new DefaultSettingsBuilderFactory().newInstance();

            if (request.getGlobalSettingsFile() != null) {
                log.log(Level.FINE, "Using {0} to get global Maven settings.xml", request.getGlobalSettingsFile()
                        .getAbsolutePath());
            }
            final File userSettingsFile = request.getUserSettingsFile();
            if (userSettingsFile != null) {
                log.log(Level.FINE, "Using {0} to get user Maven settings.xml", userSettingsFile.getAbsolutePath());

                // Maven will not check the format passed in (any XML will do), so let's ensure we have a
                // settings.xml by checking just the top-level element
                final XMLStreamReader reader;
                try {
                    reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(userSettingsFile));
                    // get the first element name
                    while (reader.hasNext()) {
                        if (reader.next() == XMLStreamConstants.START_ELEMENT) {
                            break;
                        }
                    }
                    final String topLevel = reader.getLocalName();

                    if (!"settings".equals(topLevel)) {
                        throw new InvalidConfigurationFileException("Invalid format settings.xml found: "
                                + userSettingsFile);
                    }
                } catch (final FileNotFoundException e) {
                    // Ignore at this level
                } catch (final XMLStreamException xmlse) {
                    throw new RuntimeException("Could not check file format of specified settings.xml: "
                            + userSettingsFile, xmlse);
                }

            }

            result = builder.build(request);
        }
        // wrap exception message
        catch (SettingsBuildingException e) {
            StringBuilder sb = new StringBuilder("Found ").append(e.getProblems().size())
                    .append(" problems while building settings.xml model from both global Maven configuration file")
                    .append(request.getGlobalSettingsFile()).append(" and/or user configuration file: ")
                    .append(request.getUserSettingsFile()).append("\n");

            int counter = 1;
            for (SettingsProblem problem : e.getProblems()) {
                sb.append(counter++).append("/ ").append(problem).append("\n");
            }

            throw new InvalidConfigurationFileException(sb.toString());
        }

        // get settings object and update it according to property values
        Settings settings = result.getEffectiveSettings();
        settings = enrichWithLocalRepository(settings);
        settings = enrichWithOfflineMode(settings);
        settings = decryptPasswords(settings);
        return settings;
    }
486805
public CompletableFuture<ExecuteResponse> execute(ExecuteRequest request) {
    logRequest(request);
    return CompletableFuture.completedFuture(logResponse(ExecuteResponse.error()));
  }
592739
public GetStatUvResponse getStatUv(GetStatUvRequest request) {
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, STAT, "uv");
        
        if (request.getStartTime() != null) {
            internalRequest.addParameter("startTime", DateUtils.formatAlternateIso8601Date(request.getStartTime()));
        }
        
        if (request.getEndTime() != null) {
            internalRequest.addParameter("endTime", DateUtils.formatAlternateIso8601Date(request.getEndTime()));
        }
        
        if (request.getDomain() != null) {
            internalRequest.addParameter("domain", request.getDomain());
        }
        
        if (request.getPeriod() != null) {
            internalRequest.addParameter("period", String.valueOf(request.getPeriod()));
        }
        
        return this.invokeHttpClient(internalRequest, GetStatUvResponse.class);
    }
359833
public Response api(Request request) throws IOException {
    Request req = new Request();
    req.setMethod(request.getMethod());
    req.setBaseUri(this.host);
    req.setEndpoint("/" + version + "/" + request.getEndpoint());
    req.setBody(request.getBody());
    for (Map.Entry<String, String> header : this.requestHeaders.entrySet()) {
      req.addHeader(header.getKey(), header.getValue());
    }
    for (Map.Entry<String, String> queryParam : request.getQueryParams().entrySet()) {
      req.addQueryParam(queryParam.getKey(), queryParam.getValue());
    }

    return makeCall(req);
  }
726556
public GetStatHitRateResponse getStatHitRate(GetStatHitRateRequest request) {
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, STAT, "hitrate");
        
        if (request.getStartTime() != null) {
            internalRequest.addParameter("startTime", DateUtils.formatAlternateIso8601Date(request.getStartTime()));
        }
        
        if (request.getEndTime() != null) {
            internalRequest.addParameter("endTime", DateUtils.formatAlternateIso8601Date(request.getEndTime()));
        }
        
        if (request.getDomain() != null) {
            internalRequest.addParameter("domain", request.getDomain());
        }
        
        if (request.getPeriod() != null) {
            internalRequest.addParameter("period", String.valueOf(request.getPeriod()));
        }
        
        return this.invokeHttpClient(internalRequest, GetStatHitRateResponse.class);
    }
731433
public void setRequest(HttpServletRequest request) {
		WaybackRequest wbRequest = new WaybackRequest();
		wbRequest.extractHttpRequestInfo(request);
		this.wbRequest = wbRequest;
	}
881086
private boolean send(String request)
    {
        needRateLimit = !client.send(request, false);
        attemptedToSend = true;
        return !needRateLimit;
    }
1114591
public static long setMaxAge(HttpResponse response, int maxAge) {
        List<Directive> directives = new ArrayList<>();
        directives.add(new Directive("max-age", maxAge));
        response.setField(HttpField.CACHE_CONTROL, directives);
        return maxAge;
    }
545553
public long nzNumber(ImapRequestLineReader request) throws ProtocolException {
        long number = number(request);
        if (number == 0) {
            throw new ProtocolException("Zero value not permitted.");
        }
        return number;
    }