public synchronized Map<ServerLocation, ServerLoad> getLoadMap() {
    Map<ServerLocationAndMemberId, LoadHolder> connectionMap = connectionLoadMap.get(null);
    Map<ServerLocation, LoadHolder> queueMap = queueLoadMap.get(null);
    Map<ServerLocation, ServerLoad> result = new HashMap<>();

    for (Entry<ServerLocationAndMemberId, LoadHolder> entry : connectionMap
        .entrySet()) {
      ServerLocation location = entry.getKey().getServerLocation();
      LoadHolder connectionLoad = entry.getValue();
      LoadHolder queueLoad = queueMap.get(location);
      // was asynchronously removed
      if (queueLoad == null) {
        continue;
      }
      result.put(location,
          new ServerLoad(connectionLoad.getLoad(), connectionLoad.getLoadPerConnection(),
              queueLoad.getLoad(), queueLoad.getLoadPerConnection()));
    }
    return result;
  }
Test hook to get the current load for all servers Returns a map of ServerLocation->Load for
each server.
geode-core/src/main/java/org/apache/geode/distributed/internal/LocatorLoadSnapshot.java