diff --git a/core/src/main/java/com/threerings/presents/peer/server/persist/NodeRepository.java b/core/src/main/java/com/threerings/presents/peer/server/persist/NodeRepository.java index b24b6e4fa..7ee55bfbd 100644 --- a/core/src/main/java/com/threerings/presents/peer/server/persist/NodeRepository.java +++ b/core/src/main/java/com/threerings/presents/peer/server/persist/NodeRepository.java @@ -90,6 +90,18 @@ public class NodeRepository extends DepotRepository return (conditions.isEmpty() ? query : query.where(conditions)).select(); } + /** + * Returns a list of nodes registered in the repository with the specified region that are not + * explicitly shut down. + */ + public List loadNodesFromRegion (String region) + { + return from(NodeRecord.class) + .noCache() + .where(NodeRecord.REGION.eq(region), Ops.not(NodeRecord.SHUTDOWN)) + .select(); + } + /** * Updates the supplied node record, inserting it into the database if necessary. */