@Override
  public void handleRequest(RestRequest restRequest, RestResponseChannel restResponseChannel)
      throws RestServiceException {
    if (isRunning() && requestWorkersCount > 0) {
      getWorker().submitRequest(restRequest, restResponseChannel);
    } else {
      metrics.requestResponseHandlerUnavailableError.inc();
      throw new RestServiceException(
          "Requests cannot be handled because the AsyncRequestResponseHandler is not available",
          RestServiceErrorCode.ServiceUnavailable);
    }
  }
Queues the {@code restRequest} to be handled async. When this function returns, it may not be handled yet. When
the response is ready, {@link RestResponseChannel} will be used to send the response.
@param restRequest the {@link RestRequest} that needs to be handled.
@param restResponseChannel the {@link RestResponseChannel} on which a response to the request may be sent.
@throws IllegalArgumentException if either of {@code restRequest} or {@code restResponseChannel} is null.
@throws RestServiceException if there is a problem queuing the request.
ambry-rest/src/main/java/com/github/ambry/rest/AsyncRequestResponseHandler.java