private void populateCache() {
    
    if (!cacheLoaded) {
      if (hostConfigMappingByHost == null) {
        hostConfigMappingByHost = new ConcurrentHashMap<>();

        TypedQuery<HostConfigMappingEntity> query = entityManagerProvider.get().createNamedQuery(
            "HostConfigMappingEntity.findAll", HostConfigMappingEntity.class);

        List<HostConfigMappingEntity> hostConfigMappingEntities = daoUtils.selectList(query);

        for (HostConfigMappingEntity hostConfigMappingEntity : hostConfigMappingEntities) {
          Long hostId = hostConfigMappingEntity.getHostId();

          if (hostId == null) {
            continue;
          }

          Set<HostConfigMapping> setByHost;
          if (hostConfigMappingByHost.containsKey(hostId)) {
            setByHost = hostConfigMappingByHost.get(hostId);
          } else {
            setByHost = new HashSet<>();
            hostConfigMappingByHost.put(hostId, setByHost);
          }

          HostConfigMapping hostConfigMapping = buildHostConfigMapping(hostConfigMappingEntity);
          setByHost.add(hostConfigMapping);
        }
      }
      
      cacheLoaded = true;
    }
  }
Used for host configuration mapping operations.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAO.java