@Override
  public OperationQuota checkBatchQuota(final Region region,
    final List<ClientProtos.Action> actions, boolean hasCondition)
    throws IOException, RpcThrottlingException {
    int numWrites = 0;
    int numReads = 0;
    boolean isAtomic = false;
    for (final ClientProtos.Action action : actions) {
      if (action.hasMutation()) {
        numWrites++;
        OperationQuota.OperationType operationType =
          QuotaUtil.getQuotaOperationType(action, hasCondition);
        if (operationType == OperationQuota.OperationType.CHECK_AND_MUTATE) {
          numReads++;
          // If any mutations in this batch are atomic, we will count the entire batch as atomic.
          // This is a conservative approach, but it is the best that we can do without knowing
          // the block bytes scanned of each individual action.
          isAtomic = true;
        }
      } else if (action.hasGet()) {
        numReads++;
      }
    }
    return checkBatchQuota(region, numWrites, numReads, isAtomic);
  }
Returns the quota for an operation.
@param ugi   the user that is executing the operation
@param table the table where the operation will be executed
@return the OperationQuota
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionServerRpcQuotaManager.java