public void checkQuota(
      long writeReqs, long estimateWriteSize, long readReqs, long estimateReadSize)
      throws RpcThrottlingException {
    if (!reqsLimiter.canExecute(writeReqs + readReqs)) {
      throw new RpcThrottlingException(
          "number of requests exceeded - wait " + reqsLimiter.waitInterval() + "ms",
          TSStatusCode.NUM_REQUESTS_EXCEEDED.getStatusCode());
    }

    if (!reqSizeLimiter.canExecute(estimateWriteSize + estimateReadSize)) {
      throw new RpcThrottlingException(
          "request size limit exceeded - wait " + reqSizeLimiter.waitInterval() + "ms",
          TSStatusCode.REQUEST_SIZE_EXCEEDED.getStatusCode());
    }

    if (estimateWriteSize > 0) {
      if (!writeReqsLimiter.canExecute(writeReqs)) {
        throw new RpcThrottlingException(
            "number of write requests exceeded - wait " + writeReqsLimiter.waitInterval() + "ms",
            TSStatusCode.NUM_WRITE_REQUESTS_EXCEEDED.getStatusCode());
      }

      if (!writeSizeLimiter.canExecute(estimateWriteSize)) {
        throw new RpcThrottlingException(
            "write size limit exceeded - wait " + writeSizeLimiter.waitInterval() + "ms",
            TSStatusCode.WRITE_SIZE_EXCEEDED.getStatusCode());
      }
    }

    if (estimateReadSize > 0) {
      if (!readReqsLimiter.canExecute(readReqs)) {
        throw new RpcThrottlingException(
            "number of read requests exceeded - wait " + readReqsLimiter.waitInterval() + "ms",
            TSStatusCode.NUM_READ_REQUESTS_EXCEEDED.getStatusCode());
      }

      if (!readSizeLimiter.canExecute(estimateReadSize)) {
        throw new RpcThrottlingException(
            "read size limit exceeded - wait " + readSizeLimiter.waitInterval() + "ms",
            TSStatusCode.READ_SIZE_EXCEEDED.getStatusCode());
      }
    }
  }
Checks if it is possible to execute the specified operation.

@param writeReqs the write requests that will be checked against the available quota
@param estimateWriteSize the write size that will be checked against the available quota
@param readReqs the read requests that will be checked against the available quota
@param estimateReadSize the read size that will be checked against the available quota
@throws RpcThrottlingException thrown if not enough available resources to perform operation.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/QuotaLimiter.java