logger.debug("checkExpirations:" +
logger.debug("electLeader:" +
  private void checkExpirations() {    logger.debug("check expirations");    boolean foundExpired = false;    synchronized (statusMap) {      for (Iterator it = statusMap.values().iterator(); it.hasNext();) {        StatusEntry se = (StatusEntry)it.next();        if (se != null && isExpired(se)) {          //logger.info("Expired: name=" + se.name + " state=" + se.currentState + " ttl=" + se.ttl);          queueChangeEvent(            new CommunityStatusChangeEvent(CommunityStatusChangeEvent.STATE_EXPIRATION,                                           se.name,                                           se.type,                                           se.currentState,                                           -1,                                           null,                                           null,                                           null,                                           null));        }      }    }    //logger.info("Status: leader=" + getLeader() + " expired=" + isExpired(getLeader()));    if (getLeader() == null ||        getCurrentState(getLeader()) == triggerState) {      String currentLeader = getLeader();      logger.debug("checkExpirations:" +                  " leader=" + leader +                  " leaderState=" + (currentLeader == null ? null : getCurrentState(currentLeader) +                  " triggerState=" + triggerState));      electLeader();    }  }