public static ClientMembershipListener[] getClientMembershipListeners() {
    startMonitoring();
    // Synchronization is not needed because we never modify this list
    // in place.

    List<ClientMembershipListener> l = clientMembershipListeners; // volatile fetch
    // convert to an array
    return l.toArray(new ClientMembershipListener[0]);
  }
Returns an array of all the currently registered {@code ClientMembershipListener}s.
Modifications to the returned array will not effect the registration of these listeners.

@return the registered {@code ClientMembershipListener}s; an empty array if no listeners
geode-core/src/main/java/org/apache/geode/internal/cache/tier/InternalClientMembership.java