@Nonnull
    public Map<NodeID, Set<Occupant>> getLocalOccupantsByNode()
    {
        mutex.readLock().lock();
        try {
            final Map<NodeID, Set<Occupant>> result = new HashMap<>();
            for (final Map.Entry<NodeID, Map<JID, Set<Occupant>>> entry : localOccupantsByNode.entrySet()) {
                final Set<Occupant> occupants = entry.getValue().values().stream().flatMap(Collection::stream).collect(Collectors.toSet());
                result.put(entry.getKey(), occupants);
            }
            return Collections.unmodifiableMap(result);
        } finally {
            mutex.readLock().unlock();
        }
    }
Removes and returns all data that was maintained for cluster nodes other than the local node. It is assumed that
this method is used in reaction to the local cluster node having left the cluster.

@return All data that this instance maintained for all cluster nodes except the local one.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/OccupantManager.java