restartAgent(agentsToRestart[i]);
String curNode = model.getLocation(agentsToRestart[i]); String destNode = hmr.getDestinationNode(); if (destNode == null) { Set excludedNodes = getExcludedNodes(); excludedNodes.add(curNode); destNode = RestartDestinationLocator.getRestartLocation(agentsToRestart[i], getExcludedNodes()); } restartAgent(agentsToRestart[i], destNode);
    public void execute() {      for (Iterator it = forcedRestartRequests.getAddedCollection().iterator(); it.hasNext(); ) {        HealthMonitorRequest hmr = (HealthMonitorRequest) it.next();        logger.info("Received FORCED_RESTART request:" + hmr);        String agentsToRestart[] = hmr.getAgents();        for (int i = 0; i < agentsToRestart.length; i++) {          killAgent(agentsToRestart[i]);          restartAgent(agentsToRestart[i]);        }      }    }