public static void registerClientMembershipListener(ClientMembershipListener listener) {
    startMonitoring();
    synchronized (membershipLock) {
      List<ClientMembershipListener> oldListeners = clientMembershipListeners;
      if (!oldListeners.contains(listener)) {
        List<ClientMembershipListener> newListeners =
            new ArrayList<>(oldListeners);
        newListeners.add(listener);
        clientMembershipListeners = newListeners;
      }
    }
  }
Registers a {@link ClientMembershipListener} for notification of connection changes for
CacheServer and clients.

@param listener a ClientMembershipListener to be registered
geode-core/src/main/java/org/apache/geode/internal/cache/tier/InternalClientMembership.java