(isLeader(thisAgent) && name.equals(preferredLeader));
(isLeader(thisAgent) && name.equals(preferredLeader()) && (getActiveHosts().size() > 1));
  private boolean canRestartAgent(String name) {    String preferredLeader = preferredLeader();    return thisAgent.equals(preferredLeader()) ||        (isLeader(thisAgent) && name.equals(preferredLeader));  }