} else { logger.info("Ping:" + " agent=" + name + " state=" + stateName(model.getCurrentState(name)) + " timeout=" + pingTimeout + " actual=" + time + " result=" + (status == PingHelper.SUCCESS ? "SUCCESS" : "FAIL") + (status == PingHelper.SUCCESS ? "" : " newState=" + stateName(stateOnFail))); newState(name, stateOnFail);
} if (!loadBalanceInProcess) {  loadBalanceInProcess = true; LoadBalancerListener newLbl = new LoadBalancerListener() { public void layoutReady(Map layout) { lbl.layoutReady(layout); loadBalanceInProcess = false; } };     long annealTime = pingTimeout > 0 ? pingTimeout / 1000 / 2 / 9 : LoadBalancer.DEFAULT_ANNEAL_TIME; logger.debug("Get restart destinations from LoadBalancer"); getLoadBalancer().doLayout( (int) annealTime, true, new ArrayList(newNodes), new ArrayList(deadNodes), excludedNodes, newLbl);  newNodes.clear();
      public void pingComplete(String name, int status, long time) {        if (status == PingHelper.SUCCESS) {          newState(name, stateOnSuccess);          if (!isLocal(name)) {            pingStats.enter(time);            if (pingStats.getCount() == 10 || pingStats.getCount()%25 == 0) {              setPingTimeout();            }          }        } else {          logger.info("Ping:" +                       " agent=" + name +                       " state=" + stateName(model.getCurrentState(name)) +                       " timeout=" + pingTimeout +                       " actual=" + time +                       " result=" + (status == PingHelper.SUCCESS ? "SUCCESS" : "FAIL") +                       (status == PingHelper.SUCCESS ? "" : " newState=" + stateName(stateOnFail)));          newState(name, stateOnFail);        }      }