Interface DocumentProcessor
-
- All Known Implementing Classes:
AsyncDocumentProcessor
,AsyncNodeStateProcessor
,CompositeDocumentProcessor
,ConsistencyCheck
,NodeCounter
,OrphanedNodeCheck
,Progress
,ProgressWithETA
,ReferenceCheck
,Summary
public interface DocumentProcessor
Defines an interface to processNodeDocument
s.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
end(@NotNull java.util.concurrent.BlockingQueue<Result> results)
This method is called after the last document has been processed.static java.lang.String
nowAsISO8601()
void
processDocument(@NotNull NodeDocument document, @NotNull java.util.concurrent.BlockingQueue<Result> results)
Process the given document and publish the result to theresults
queue.
-
-
-
Method Detail
-
processDocument
void processDocument(@NotNull @NotNull NodeDocument document, @NotNull @NotNull java.util.concurrent.BlockingQueue<Result> results) throws java.lang.InterruptedException
Process the given document and publish the result to theresults
queue. An implementation is not required to publish a result for each processed document.- Parameters:
document
- the document to process.results
- the queue to publish results if necessary.- Throws:
java.lang.InterruptedException
- if publishing a result is interrupted.
-
end
default void end(@NotNull @NotNull java.util.concurrent.BlockingQueue<Result> results) throws java.lang.InterruptedException
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.
-
nowAsISO8601
static java.lang.String nowAsISO8601()
- Returns:
- the current time as an ISO-8601 formatted string.
-
-