setLocation(agentName, as[i].getLocation());
  public void applyUpdates(String nodeName, int nodeStatus, AgentStatus[] as, String vote) {    synchronized (statusMap) {      logger.debug("ApplyUpdates:" +                   " node=" + nodeName +                   " nodeStatus=" + controller.stateName(nodeStatus) +                   " numAgents=" + as.length);      if (statusMap.containsKey(nodeName)) {        setCurrentState(nodeName, nodeStatus);        setLeaderVote(nodeName, vote);      } else {        StatusEntry se = new StatusEntry(nodeName, NODE, null);        statusMap.put(se.name, se);        setCurrentState(se.name, INITIAL);        queueChangeEvent(          new CommunityStatusChangeEvent(CommunityStatusChangeEvent.MEMBERS_ADDED, se));      }      // Apply agent status changes      for (int i = 0; i < as.length; i++) {        String agentName = as[i].getName();        if (statusMap.containsKey(agentName)) {          setCurrentState(agentName, as[i].getStatus());          setLocation(agentName, as[i].getLocation());        }      }      electLeader();    }  }