newState(agentsOnNode(name, DefaultRobustnessController.ACTIVE), DEAD);
newState(agentsOnNode(name), DEAD);
    public void enter(final String name) {      if (logger.isInfoEnabled()) {        logger.info("Dead agent detected: agent=" + name);      }      setExpiration(name, NEVER);      communityReady = false; // For ACME Community Ready Events      if (isSentinel()) {        if (isAgent(name)) {          int priorState = getPriorState(name);          if (priorState != DECONFLICT && priorState != RESTART) {            newState(name, DECONFLICT);          } else {            if (logger.isWarnEnabled()) {              logger.warn("Unexpected transition to DEAD state: agent=" + name +                          " priorState=" + stateName(getPriorState(name)) +                          " loc=" + getLocation(name));            }          }        } else { // a node          deadNodes.add(name);          if (!useGlobalSolver()) {            newState(agentsOnNode(name, DefaultRobustnessController.ACTIVE), DEAD);            //newState(agentsOnNode(name), DEAD);            removeFromCommunity(name);          } else {            if (agentsOnNode(name, DefaultRobustnessController.ACTIVE).size() > 0) {              getLayout(new LoadBalancerListener() {                public void layoutReady(Map layout) {                  if (getState(name) == DEAD) {                    if (logger.isInfoEnabled()) {                      logger.info("layout from EN4J: " + layout);                    }                    getRestartLocator().setPreferredRestartLocations(layout);                    newState(agentsOnNode(name, DefaultRobustnessController.ACTIVE), DEAD);                    //newState(agentsOnNode(name), DEAD);                    removeFromCommunity(name);                  } else { // Abort, node no longer classified as DEAD                    deadNodes.remove(name);                    if (logger.isInfoEnabled()) {                      logger.info("Restart aborted: node=" + name +                                  " state=" + stateName(getState(name)));                    }                  }                }              }, name);            } else {              removeFromCommunity(name);            }          }        }      } else {  // I'm not the manager agent        if (isNode(name)) {          newState(agentsOnNode(name, DefaultRobustnessController.ACTIVE), DEAD);        }      }    }