public static Map getConnectedClients(InternalCache cache) {

    // Get all clients
    Map allClients = new HashMap();
    for (final CacheServer server : cache.getCacheServers()) {
      InternalCacheServer cacheServer = (InternalCacheServer) server;
      Acceptor acceptor = cacheServer.getAcceptor();
      if (acceptor != null && acceptor.getCacheClientNotifier() != null) {
        allClients.putAll(acceptor.getCacheClientNotifier().getAllClients());
      }
    }

    // Fill in the missing info, if HealthMonitor started
    if (ClientHealthMonitor.getInstance() != null) {
      ClientHealthMonitor.getInstance().fillInClientInfo(allClients);
    }

    return allClients;
  }
Caller must synchronize on cache.allClientServersLock

@return all the clients
geode-core/src/main/java/org/apache/geode/internal/cache/tier/InternalClientMembership.java