Class NodeCounter
java.lang.Object
org.apache.jackrabbit.oak.plugins.document.check.AsyncDocumentProcessor
org.apache.jackrabbit.oak.plugins.document.check.AsyncNodeStateProcessor
org.apache.jackrabbit.oak.plugins.document.check.NodeCounter
- All Implemented Interfaces:
DocumentProcessor
Count documents and nodes that exist.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jackrabbit.oak.plugins.document.check.AsyncNodeStateProcessor
AsyncNodeStateProcessor.NodeStateTask
-
Field Summary
Fields inherited from class org.apache.jackrabbit.oak.plugins.document.check.AsyncNodeStateProcessor
headRevision, ns, uuidIndex
-
Constructor Summary
ConstructorsConstructorDescriptionNodeCounter
(DocumentNodeStore ns, RevisionVector headRevision, ExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
end
(@NotNull BlockingQueue<Result> results) This method is called after the last document has been processed.protected void
Responsibility of the subclass to implement the processor logic.Methods inherited from class org.apache.jackrabbit.oak.plugins.document.check.AsyncNodeStateProcessor
createTask, getNodeByUUID, process
Methods inherited from class org.apache.jackrabbit.oak.plugins.document.check.AsyncDocumentProcessor
processDocument
-
Constructor Details
-
NodeCounter
public NodeCounter(DocumentNodeStore ns, RevisionVector headRevision, ExecutorService executorService)
-
-
Method Details
-
runTask
protected void runTask(@NotNull @NotNull Path path, @Nullable @Nullable NodeState state, @NotNull @NotNull 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 classAsyncNodeStateProcessor
- Parameters:
path
- the path of theNodeState
to process.state
- theNodeState
ornull
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
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:
InterruptedException
- if publishing a result is interrupted.
-