public synchronized void run() {
      synchronized (messageCounters) {
        Iterator<MessageCounter> iter = messageCounters.values().iterator();

        while (iter.hasNext()) {
          MessageCounter counter = (MessageCounter) iter.next();

          counter.onTimer();
        }
      }
    }
  public void resetAllCounterHistories() {
    synchronized (messageCounters) {
      Iterator<MessageCounter> iter = messageCounters.values().iterator();

      while (iter.hasNext()) {
        MessageCounter counter = (MessageCounter) iter.next();

        counter.resetHistory();
      }
    }
  }