public void initHeartbeatCache(final IManager configManager) {
    initNodeHeartbeatCache(
        configManager.getNodeManager().getRegisteredConfigNodes(),
        configManager.getNodeManager().getRegisteredDataNodes(),
        configManager.getNodeManager().getRegisteredAINodes());
    initRegionGroupHeartbeatCache(
        configManager.getClusterSchemaManager().getDatabaseNames(null).stream()
            .collect(
                Collectors.toMap(
                    database -> database,
                    database -> configManager.getPartitionManager().getAllReplicaSets(database))));
  }
Maintain all kinds of heartbeat samples and statistics.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/LoadCache.java