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