@Override
    // Beware that the invocation does not properly initialize the first argument! Do not use it without fixing that!
    public void roomDestroyed(final long unused, @Nonnull final JID roomJID)
    {
        // When a room is destroyed, remove all registered occupants for that room.
        mutex.writeLock().lock();
        try {
            nodeByLocalOccupant.entrySet().stream()
                .filter(entry -> entry.getKey().getRoomName().equals(roomJID.getNode()))
                .forEach(entry -> replaceLocalOccupant(entry.getKey(), null, entry.getValue()));

            federatedOccupants.values().stream()
                .flatMap(Collection::stream)
                .filter(occupant -> occupant.getRoomName().equals(roomJID.getNode()))
                .forEach(occupant -> replaceFederatedOccupant(occupant, null));
        } finally {
            mutex.writeLock().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