Package org.apache.openmeetings.cluster.beans

Examples of org.apache.openmeetings.cluster.beans.ServerDTO


      for (Server server : serverList) {
        List<Long> roomIds = sessionManager.getActiveRoomIdsByServer(server);
        if (roomIds.contains(roomId)) {
          // if the room is already opened on a server, redirect the user to that one,
          log.debug("Room is already opened on a server " + server.getAddress());
          return new ServerDTO(server);
        }
        activeRoomsMap.put(server, roomIds);
      }
      for (Server server : activeRoomsMap.keySet()) {
        List<Long> roomIds = activeRoomsMap.get(server);
        Long capacity = roomDao.getRoomsCapacityByIds(roomIds);
        if (minimum < 0 || capacity < minimum) {
          minimum = capacity;
          result = server;
        }
        log.debug("Checking server: " + server + " Number of rooms " + roomIds.size() + " RoomIds: "
            + roomIds + " max(Sum): " + capacity);
      }
      return result == null ? null : new ServerDTO(result);
    }

    log.error("Could not get server for cluster session");
    // Empty server object
    return null;
View Full Code Here


      for (Server server : serverList) {
        List<Long> roomIds = sessionManager.getActiveRoomIdsByServer(server);
        if (roomIds.contains(roomId)) {
          // if the room is already opened on a server, redirect the user to that one,
          log.debug("Room is already opened on a server " + server.getAddress());
          return new ServerDTO(server);
        }
        activeRoomsMap.put(server, roomIds);
      }
      for (Server server : activeRoomsMap.keySet()) {
        List<Long> roomIds = activeRoomsMap.get(server);
        Long capacity = roomDao.getRoomsCapacityByIds(roomIds);
        if (minimum < 0 || capacity < minimum) {
          minimum = capacity;
          result = server;
        }
        log.debug("Checking server: " + server + " Number of rooms " + roomIds.size() + " RoomIds: "
            + roomIds + " max(Sum): " + capacity);
      }
      return result == null ? null : new ServerDTO(result);
    }

    log.error("Could not get server for cluster session");
    // Empty server object
    return null;
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.cluster.beans.ServerDTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.