public List getGroups()

in iep-servergroups/src/main/java/com/netflix/iep/servergroups/GroupService.java [136:154]


  public List<ServerGroup> getGroups() {
    List<ServerGroup> groups = merged;
    if (groups == null) {
      groups = new ArrayList<>();

      // Merge in the order for the keys of the loader
      for (String k : loaders.keySet()) {
        List<ServerGroup> otherGroups = cachedData.get(k);
        if (otherGroups != null && !otherGroups.isEmpty()) {
          groups = ServerGroup.merge(groups, otherGroups);
        }
      }
      groups = Collections.unmodifiableList(groups);

      // Keep a copy so it can be reused if there haven't been any updates
      merged = groups;
    }
    return groups;
  }