code: protected void removeExpired(Map<Integer, Context> contexts) {
          Iterator<Context> contextsIter = contexts.values().iterator();
          while (contextsIter.hasNext()) {
              Context context = contextsIter.next();
              if (context.completeMoment != null
                      && System.currentTimeMillis() - context.completeMoment > contextTimeout) {
                  contextsIter.remove();
              }
          }
      }
docs: Remove all contexts that are expired.
  @param contexts all contexts currently in memory