public boolean shouldThrottle(RestRequest restRequest) {
    boolean shouldThrottle;
    // Check quotaMap
    RejectThrottler throttler = quotaMap.get(restRequest.getRestMethod());
    shouldThrottle = (throttler != null && throttler.shouldThrottle(1));
    // Check hardwareThresholdMap
    for (HardwareResource hardwareResource : HardwareResource.values()) {
      if (!shouldThrottle && hardwareThresholdMap.containsKey(hardwareResource)) {
        shouldThrottle = !hardwareThresholdMap.get(hardwareResource)
            .meetRequirement((long) hardwareUsageMeter.getHardwareResourcePercentage(hardwareResource));
        if (shouldThrottle) {
          logger.warn("Throttle because of {} : {}%", hardwareResource,
              hardwareUsageMeter.getHardwareResourcePercentage(hardwareResource));
        }
      }
    }
    return shouldThrottle;
  }
Return {@code true} if throttling is required. Return {@code false} if no throttler for this rest method or quota
is not reached.
@param restRequest provides the information.
ambry-commons/src/main/java/com/github/ambry/commons/HostLevelThrottler.java