code: public void processDocument(BufferedReader document, long timeStamp) 
          throws IOException {
  
          if (startTime != null && shouldPartitionSpace(timeStamp)) {
              for (Iterator<Runnable> it = partitionHooks.iterator(); 
                   it.hasNext(); ) {
                  Runnable r = it.next();
                  // If one of the hooks has errors, remove it from processing but
                  // don't stop processing.
                  try {
                      r.run();
                  } catch (Throwable t) {
                      LOGGER.warning("Partition hook " + r + " caused the " + 
                             "following exception during its operations" +
                             t + " and is being removed");
                      it.remove();
                  }
              }
              clear();
          }
          
          // Update the semantic slice ranges as necessary
          if (startTime == null) {
              startTime = timeStamp;
              endTime = timeStamp;
          }
          else if (endTime < timeStamp)
              timeStamp = endTime;
  
          currentSlice.processDocument(document);
      }
docs: {@inheritDoc}