" newState=" + se.currentState + " priorState=" + se.priorState + " expiration=" + expiration);
" newState=" + controller.stateName(se.currentState) + " priorState=" + controller.stateName(se.priorState) + " expiration=" + (expiration == NEVER ? "NEVER" : Long.toString(expiration)));
  public void setCurrentState(String name, int state, long expiration) {    StatusEntry se = (StatusEntry)statusMap.get(name);    if (se != null) {      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 (hasAttribute(se.attrs, "Role", HEALTH_MONITOR)) {          electLeader();        }        queueChangeEvent(            new CommunityStatusChangeEvent(CommunityStatusChangeEvent.                                           STATE_CHANGE, se));      }    } else {      logger.warn("setCurrentState: status entry not found, agent=" + name);    }  }