public void updateFlowCtrlInfo(int qryPriorityId, long flowCtrlId,
            String flowCtrlInfo, StringBuilder strBuff) throws Exception {
        if (flowCtrlId == this.flowCtrlId.get()) {
            return;
        }
        long befFlowCtrlId;
        int befQryPriorityId = TBaseConstants.META_VALUE_UNDEFINED;
        Map<Integer, List<FlowCtrlItem>> flowCtrlItemsMap = null;
        if (TStringUtils.isNotBlank(flowCtrlInfo)) {
            flowCtrlItemsMap = parseFlowCtrlInfo(flowCtrlInfo);
        }
        writeLock.lock();
        try {
            befFlowCtrlId = this.flowCtrlId.getAndSet(flowCtrlId);
            this.strFlowCtrlInfo = flowCtrlInfo;
            clearStatisData();
            if (flowCtrlItemsMap == null
                    || flowCtrlItemsMap.isEmpty()) {
                this.flowCtrlRuleSet.clear();
            } else {
                flowCtrlRuleSet = flowCtrlItemsMap;
                initialStatisData();
            }
            if (qryPriorityId != TBaseConstants.META_VALUE_UNDEFINED
                    && qryPriorityId != this.qryPriorityId.get()) {
                befQryPriorityId = this.qryPriorityId.getAndSet(qryPriorityId);
            }
            this.lastUpdateTime = System.currentTimeMillis();
        } finally {
            writeLock.unlock();
        }
        strBuff.append("[Flow Ctrl] Update ").append(flowCtrlName)
                .append(", flowId from ").append(befFlowCtrlId)
                .append(" to ").append(flowCtrlId);
        if (qryPriorityId != TBaseConstants.META_VALUE_UNDEFINED
                && qryPriorityId != befQryPriorityId) {
            strBuff.append(", qryPriorityId from ").append(befQryPriorityId)
                    .append(" to ").append(qryPriorityId);
        }
        logger.info(strBuff.toString());
        strBuff.delete(0, strBuff.length());
    }
Parse flow control information and update stored cached old content

@param qryPriorityId    the query priority id
@param flowCtrlId       flow control information id
@param flowCtrlInfo     flow control information content
@param strBuff          the string buffer
@throws Exception       the exception thrown
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/policies/FlowCtrlRuleHandler.java