if (se != null) { setCurrentState(name, state, (se.ttl > 0 ? se.ttl : DEFAULT_TTL)); } else { logger.error("No status entry found for " + name); }
se.timestamp = now(); if (se.currentState != state) { se.priorState = se.currentState; se.currentState = state; se.expiration = expiration; logger.debug("setCurrentState" + " agent=" + name + " newState=" + se.currentState + " priorState=" + se.priorState + " expiration=" + expiration); if (se.type == NODE) { electLeader(); } queueChangeEvent( new CommunityStatusChangeEvent(CommunityStatusChangeEvent.STATE_CHANGE, se)); }
  public void setCurrentState(String name, int state) {    StatusEntry se = (StatusEntry)statusMap.get(name);    if (se != null) {      setCurrentState(name, state, (se.ttl > 0 ? se.ttl : DEFAULT_TTL));    } else {      logger.error("No status entry found for " + name);    }  }