long timeout = getLongAttribute(DEFAULT_TIMEOUT_ATTRIBUTE, DEFAULT_TIMEOUT) * MS_PER_MIN; if (isNode(name)) { timeout = getNodeStatusExpiration(name); } else { String node = model.getLocation(name); if (node != null) { timeout = getNodeStatusExpiration(name); } }
long timeout = getTimeout(name);
  private void doPing(String name,                        final int stateOnSuccess,                        final int stateOnFail) {    long timeout = getLongAttribute(DEFAULT_TIMEOUT_ATTRIBUTE,                                    DEFAULT_TIMEOUT) * MS_PER_MIN;    if (isNode(name)) {      timeout = getNodeStatusExpiration(name);    } else {      String node = model.getLocation(name);      if (node != null) {        timeout = getNodeStatusExpiration(name);      }    }    if (logger.isDebugEnabled()) {      logger.debug("doPing:" +                  " agent=" + name +                  " timeout=" + timeout +                  " stateOnSuccess=" + stateName(stateOnSuccess) +                  " stateOnFail=" + stateName(stateOnFail));    }    PingHelper pinger = getPingHelper();    if (pinger.pingInProcess(name)) {      if (logger.isDetailEnabled()) {        logger.detail(            "Duplicate ping requested, new ping not performed: agent=" + name);      }    } else {      doPing(new String[]{name}, timeout, stateOnSuccess, stateOnFail);    }  }