public static void removeListener(ClusterEventListener listener) {
        final Optional<Pair<Integer, ClusterEventListener>> removeMe = listeners
            .stream()
            .filter(p -> p.getValue().equals(listener))
            .findAny();
        removeMe.ifPresent(listeners::remove);
    }
Unregisters a listener to receive events.

@param listener the listener.
xmppserver/src/main/java/org/jivesoftware/openfire/cluster/ClusterManager.java