code: public synchronized Map<TaskError, Integer> getRecentErrorCounts(long timeWindow) {
      long start = System.currentTimeMillis() - timeWindow;
      Map<TaskError, Integer> errorCounts = createErrorCountsMap();
      Iterator<Map<TaskError, Integer>> errorCountsIter = errorCountsQueue.iterator();
      Iterator<Long> startTimeIter = startTimeQueue.iterator();
      while (errorCountsIter.hasNext() && start < startTimeIter.next()) {
        Map<TaskError, Integer> windowErrorCounts = errorCountsIter.next();
        for (Map.Entry<TaskError, Integer> entry : windowErrorCounts.entrySet()) {
          errorCounts.put(entry.getKey(),
              errorCounts.get(entry.getKey()) + entry.getValue());
        }
      }
      return errorCounts;
    }
docs: Get recent TaskError counts within the given window
  @param timeWindow Window size in milliseconds.
  Ex: 24 * 60 * 60 * 1000 gives you last day error counts
  @return Counts for each TaskError