@Override
  public QuotaResource getQuotaResource() {
    if (Objects.isNull(quotaChargeCallback)) {
      if (!operationName.equals(ReplicateBlobOperation.class.getSimpleName())) {
        LOGGER.warn("quota charge callback is null for operation: {}", operationName);
      }
      return null;
    }
    try {
      return quotaChargeCallback.getQuotaResource();
    } catch (Exception exception) {
      if (!(exception instanceof QuotaException)) {
        routerMetrics.unknownExceptionInChargeableRate.mark();
      }
      LOGGER.error(
          "Could not create QuotaResource object during {} operation for the chunk {} due to {}. This should never happen.",
          operationName, getBlobIdStr(), exception.toString());
    }
    // A null return means quota resource could not be created for this chunk. The consumer should decide how to handle nulls.
    return null;
  }
Constructor for {@link OperationQuotaCharger}.

@param quotaChargeCallback {@link QuotaChargeCallback} object to charge and check quotas.
@param operationName Name of the operation.
ambry-router/src/main/java/com/github/ambry/router/OperationQuotaCharger.java