Class NodeCounter

    • Method Detail

      • runTask

        protected void runTask​(@NotNull
                               @NotNull Path path,
                               @Nullable
                               @Nullable NodeState state,
                               @NotNull
                               @NotNull java.util.function.Consumer<Result> resultConsumer)
        Description copied from class: AsyncNodeStateProcessor
        Responsibility of the subclass to implement the processor logic. This method will run as a task with an executor service.
        Specified by:
        runTask in class AsyncNodeStateProcessor
        Parameters:
        path - the path of the NodeState to process.
        state - the NodeState or null if the node does not exist at this path. This may happen for nodes that have been deleted but not yet garbage collected.
        resultConsumer - consumes the results of this task.
      • 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.
        Parameters:
        results - the queue to publish results if necessary.
        Throws:
        java.lang.InterruptedException - if publishing a result is interrupted.