Class Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      Summary​(int numThreads)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void end​(@NotNull java.util.concurrent.BlockingQueue<Result> results)
      This method is called after the last document has been processed.
      void processDocument​(@NotNull NodeDocument document, @NotNull java.util.concurrent.BlockingQueue<Result> results)
      Process the given document and publish the result to the results queue.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Summary

        public Summary​(int numThreads)
    • Method Detail

      • processDocument

        public void processDocument​(@NotNull
                                    @NotNull NodeDocument document,
                                    @NotNull
                                    @NotNull java.util.concurrent.BlockingQueue<Result> results)
        Description copied from interface: DocumentProcessor
        Process the given document and publish the result to the results queue. An implementation is not required to publish a result for each processed document.
        Specified by:
        processDocument in interface DocumentProcessor
        Parameters:
        document - the document to process.
        results - the queue to publish results if necessary.
      • end

        public void end​(@NotNull
                        @NotNull java.util.concurrent.BlockingQueue<Result> results)
                 throws java.lang.InterruptedException
        Description copied from interface: DocumentProcessor
        This method is called after the last document has been processed. An implementation may wish to publish aggregated results at the end.
        Specified by:
        end in interface DocumentProcessor
        Parameters:
        results - the queue to publish results if necessary.
        Throws:
        java.lang.InterruptedException - if publishing a result is interrupted.