Package org.apache.tika.pipes
Class PipesReporter
java.lang.Object
org.apache.tika.pipes.PipesReporter
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
CompositePipesReporter,FileSystemStatusReporter,LoggingPipesReporter,OpenSearchPipesReporter,PipesReporterBase
This is called asynchronously by the AsyncProcessor. This
is not thread safe, and implementers must be careful to implement
report(FetchEmitTuple, PipesResult, long) in a thread safe
way.
Note, however, that this is not called in the forked processes.
Implementers do not have to worry about synchronizing across processes;
for example, one could use an in-memory h2 database as a target.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()No-op implementation.abstract voidThis is called if the process has crashed.abstract voidThis is called if the process has crashed.abstract voidreport(FetchEmitTuple t, PipesResult result, long elapsed) voidreport(TotalCountResult totalCountResult) No-op implementation.booleanOverride this if your reporter supports total count.
-
Field Details
-
NO_OP_REPORTER
-
-
Constructor Details
-
PipesReporter
public PipesReporter()
-
-
Method Details
-
report
-
report
No-op implementation. Override for custom behavior and make sure to overridesupportsTotalCount()to returntrue- Parameters:
totalCountResult-
-
supportsTotalCount
public boolean supportsTotalCount()Override this if your reporter supports total count.- Returns:
falseas the baseline implementation
-
close
No-op implementation. Override for custom behavior- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
error
This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Parameters:
t-
-
error
This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Parameters:
msg-
-