class ErrorRequestLimiter extends RequestLimiter {

  private static final Logger logger = LoggerFactory.getLogger(ErrorRequestLimiter.class);

  /**
   * @param requestLimit the maximum number of request per <tt>requestLimitPeriodInSeconds</tt>
   * @param requestLimitPeriodInSeconds the time period over which requests are considered, in seconds
   */
  ErrorRequestLimiter(int requestLimit, int requestLimitPeriodInSeconds) {
    super(requestLimit, 0, requestLimitPeriodInSeconds);
  }

  /**
   * @param ipAddress the client's IP address
   * @return true if access is allowed because the request limit is not reached yet
   */
  boolean wouldAccessBeOkay(String ipAddress, Map<String, String> parameters, Map<String, List<String>> httpHeader) {<FILL_FUNCTION_BODY>}
  
  /**
   * @param ipAddress the client's IP address
   * @param params the request's query parameters
   */
  void logAccess(String ipAddress, Map<String, List<String>> httpHeader, Map<String, String> params) {
    while (requestEvents.size() > REQUEST_QUEUE_SIZE) {
      requestEvents.remove(0);
    }
    requestEvents.add(new RequestEvent(ipAddress, new Date(), 0, computeFingerprint(httpHeader, params), JLanguageTool.Mode.ALL));
  }
  
}

    try {
      checkLimit(ipAddress, parameters, httpHeader);
      return true;
    } catch (TooManyRequestsException e) {
      logger.info("wouldAccessBeOkay -> false: " + e.getMessage());
      return false;
    }
  
<methods><variables>static final int REQUEST_QUEUE_SIZE,private final non-sealed int ipFingerprintFactor,private final non-sealed int ipRequestLimit,private final non-sealed int ipRequestLimitInBytes,final List<org.languagetool.server.RequestLimiter.RequestEvent> requestEvents,private final non-sealed int requestLimit,private final non-sealed int requestLimitInBytes,private final non-sealed int requestLimitPeriodInSeconds,private final non-sealed int whitelistLimit,private final non-sealed List<java.lang.String> whitelistUsers