@Override
  public QuotaAction chargeAndRecommend(RestRequest restRequest, Map<QuotaName, Double> requestCostMap,
      boolean shouldCheckIfQuotaExceedAllowed, boolean forceCharge) throws QuotaException {
    QuotaResource quotaResource = QuotaResource.fromRestRequest(restRequest);
    try {
      quotaResourceSynchronizer.lock(quotaResource);
      return super.chargeAndRecommend(restRequest, requestCostMap, shouldCheckIfQuotaExceedAllowed, forceCharge);
    } finally {
      quotaResourceSynchronizer.unlock(quotaResource);
    }
  }
Constructor for {@link AtomicAmbryQuotaManager}.
@param quotaConfig {@link QuotaConfig} object.
@param quotaRecommendationMergePolicy {@link QuotaRecommendationMergePolicy} object which is the policy to merge recommendations.
@param accountService {@link AccountService} object.
@param accountStatsStore {@link AccountStatsStore} object.
@param quotaMetrics {@link QuotaMetrics} object.
@param routerConfig {@link RouterConfig} object.
@throws ReflectiveOperationException if {@link AtomicAmbryQuotaManager} could not be created.
ambry-quota/src/main/java/com/github/ambry/quota/AtomicAmbryQuotaManager.java