public long recomputeNonPersistentRoomCount()
    {
        final long count = getAll().stream().filter(room -> !room.isPersistent()).count();
        final Lock lock = ROOM_CACHE_STATS.getLock(STAT_KEY_ROOMCOUNT_NONPERSISTENT);
        lock.lock();
        try {
            final Long oldCount = ROOM_CACHE_STATS.put(STAT_KEY_ROOMCOUNT_NONPERSISTENT, count);
            if (oldCount != null && oldCount != count) {
                Log.warn("Recomputed the amount of non persistent MUC rooms. The amount registered was {}, while the new count is {}", oldCount, count);
            }
            return count;
        } finally {
            lock.unlock();
        }
    }
Iterates over all MUC rooms (in the cache, non-cached rooms are obviously not non-persistent) and counts the
number of non-persistent rooms.

This method is more resource intensive, but perhaps more accurate, than {@link #getNonPersistentRoomCount()}.

@return The count of non-persistent MUC rooms.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoomManager.java