public List<MUCRoom> getActiveAndInactiveRooms() {
        final List<MUCRoom> result = getActiveChatRooms();

        if (JiveGlobals.getBooleanProperty("xmpp.muc.search.skip-unloaded-rooms", false)) {
            return result;
        }

        final Set<String> loadedNames = result.stream().map(MUCRoom::getName).collect(Collectors.toSet());
        final Collection<String> dbNames = MUCPersistenceManager.loadRoomNamesFromDB(this);
        dbNames.removeAll(loadedNames); // what remains needs to be loaded from the database;

        for (final String name : dbNames) {
            // TODO improve scalability instead of loading every room that wasn't loaded before.
            final MUCRoom chatRoom = this.getChatRoom(name);
            if (chatRoom != null) {
                result.add(chatRoom);
            }
        }
        return result;
    }
Returns all rooms serviced by this service. This includes rooms designated as non-active, which are loaded from
the database if necessary. This method can also be used solely for that 'side' effect of ensuring that all rooms
are loaded.

@return All rooms serviced by this service.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java