@Override
    public void run() {
      long start = System.nanoTime();

      org.openntf.domino.Session s = null;
      if (Thread.currentThread() instanceof DominoChildThread) {
        s =
            (org.openntf.domino.Session)
                ((DominoChildThread) Thread.currentThread()).getContextVar("session");
      }
      Database db = null;
      if (Thread.currentThread() instanceof DominoChildThread) {
        db =
            (org.openntf.domino.Database)
                ((DominoChildThread) Thread.currentThread()).getContextVar("database");
      }
      // Database db = s.getDatabase("", "events4.nsf");

      RunContext rc = s.getRunContext();
      System.out.println("RunContext: " + rc.toString());
      Name sname = s.getUserNameObject();
      DateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
      System.out.println(df.format(new Date()) + " Name: " + sname.getCanonical());
      if (INCLUDE_FORMS) {
        iterateForms(db);
      }
      Set<Document> secondReference = new HashSet<Document>();
      iterateAllDocuments(db, secondReference);
      System.gc();
      NoteCollection nc = db.createNoteCollection(false);
      nc.buildCollection();
      iterateSecondReferences(secondReference);
      iterateThirdReferences();

      long elapsed = System.nanoTime() - start;
      StringBuilder sb = new StringBuilder();
      sb.append("Thread " + Thread.currentThread().getName());
      sb.append(" *** ALL OPERATIONS COMPLETE elapsed time: ");
      sb.append(elapsed / 1000000 + "ms: processed ");
      sb.append(nameCount + " names, ");
      sb.append(docCount + " docs, and ");
      sb.append(dateCount + " datetimes without recycling.");
      System.out.println(sb.toString());
    }