コード例 #1
0
 /**
  * Get all killed nodes in the community model.
  *
  * @return List
  */
 protected List getDeadNodes() {
   List deadNodes = new ArrayList();
   String nodes[] = model.listEntries(CommunityStatusModel.NODE, DefaultRobustnessController.DEAD);
   for (int i = 0; i < nodes.length; i++) {
     deadNodes.add(nodes[i]);
   }
   return deadNodes;
 }
コード例 #2
0
 /**
  * Get all new nodes in the community model.
  *
  * @return List
  */
 protected List getVacantNodes() {
   List vacantNodes = new ArrayList();
   String nodes[] =
       model.listEntries(CommunityStatusModel.NODE, DefaultRobustnessController.ACTIVE);
   for (int i = 0; i < nodes.length; i++) {
     if (isVacantNode(nodes[i])) {
       vacantNodes.add(nodes[i]);
     }
   }
   return vacantNodes;
 }