protected void putRecord2Caches(BrokerConfEntity entity) {
        brokerConfCache.put(entity.getBrokerId(), entity);
        // add brokerId info
        Integer brokerId = brokerIpIndexCache.get(entity.getBrokerIp());
        if (brokerId == null || brokerId != entity.getBrokerId()) {
            brokerIpIndexCache.put(entity.getBrokerIp(), entity.getBrokerId());
        }
        ConcurrentHashSet<Integer> brokerIdSet = regionIndexCache.get(entity.getRegionId());
        if (brokerIdSet == null) {
            ConcurrentHashSet<Integer> tmpBrokerIdSet = new ConcurrentHashSet<>();
            brokerIdSet = regionIndexCache.putIfAbsent(entity.getRegionId(), tmpBrokerIdSet);
            if (brokerIdSet == null) {
                brokerIdSet = tmpBrokerIdSet;
            }
        }
        brokerIdSet.add(entity.getBrokerId());
    }
Add or update a record to caches

@param entity  need added or updated entity
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/metamanage/metastore/impl/AbsBrokerConfigMapperImpl.java