responseSubscription = blackboard.subscribe(myRelayPredicate); if (haveServices()) { checkTargets(); checkSelfLaggard(true); startTimer(SHORT_CHECK_TARGETS_INTERVAL); timerTimeout = System.currentTimeMillis() + SHORT_CHECK_TARGETS_INTERVAL; } else { timerTimeout = 0L;
if (param.startsWith(TIMER_SLACK_KEY)) { TIMER_SLACK = Long.parseLong(param.substring(TIMER_SLACK_KEY.length())); if (logger.isInfoEnabled()) logger.info("Set " + TIMER_SLACK_KEY + TIMER_SLACK); continue; }
  public void setupSubscriptions() {    Collection params = getParameters();    for (Iterator i = params.iterator(); i.hasNext(); ) {      String param = (String) i.next();      if (param.startsWith(TASK_COMPLETION_THRESHOLD_KEY)) {        TASK_COMPLETION_THRESHOLD =          Double.parseDouble(param.substring(TASK_COMPLETION_THRESHOLD_KEY.length()));        if (logger.isInfoEnabled()) logger.info("Set "                                                + TASK_COMPLETION_THRESHOLD_KEY                                                + TASK_COMPLETION_THRESHOLD);        continue;      }      if (param.startsWith(UPDATE_INTERVAL_KEY)) {        UPDATE_INTERVAL = Long.parseLong(param.substring(UPDATE_INTERVAL_KEY.length()));        if (logger.isInfoEnabled()) logger.info("Set "                                                + UPDATE_INTERVAL_KEY                                                + UPDATE_INTERVAL);        continue;      }      if (param.startsWith(LONG_CHECK_TARGETS_INTERVAL_KEY)) {        LONG_CHECK_TARGETS_INTERVAL = Long.parseLong(param.substring(LONG_CHECK_TARGETS_INTERVAL_KEY.length()));        if (logger.isInfoEnabled()) logger.info("Set "                                                + LONG_CHECK_TARGETS_INTERVAL_KEY                                                + LONG_CHECK_TARGETS_INTERVAL);        continue;      }      if (param.startsWith(SHORT_CHECK_TARGETS_INTERVAL_KEY)) {        SHORT_CHECK_TARGETS_INTERVAL = Long.parseLong(param.substring(SHORT_CHECK_TARGETS_INTERVAL_KEY.length()));        if (logger.isInfoEnabled()) logger.info("Set "                                                + SHORT_CHECK_TARGETS_INTERVAL_KEY                                                + SHORT_CHECK_TARGETS_INTERVAL);        continue;      }      if (param.startsWith(DEAD_NODE_TIMEOUT_KEY)) {        DEAD_NODE_TIMEOUT = Long.parseLong(param.substring(DEAD_NODE_TIMEOUT_KEY.length()));        if (logger.isInfoEnabled()) logger.info("Set "                                                + DEAD_NODE_TIMEOUT_KEY                                                + DEAD_NODE_TIMEOUT);        continue;      }    }    responseSubscription = blackboard.subscribe(myRelayPredicate);    if (haveServices()) {      checkTargets();      checkSelfLaggard(true);      startTimer(SHORT_CHECK_TARGETS_INTERVAL);      timerTimeout = System.currentTimeMillis() + SHORT_CHECK_TARGETS_INTERVAL;    } else {      timerTimeout = 0L;    }  }