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
 
 public abstract class PipesReporter extends Object implements Closeable This is called asynchronously by the AsyncProcessor. This is not thread safe, and implementers must be careful to implementreport(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 SummaryFields Modifier and Type Field Description static PipesReporterNO_OP_REPORTER
 - 
Constructor SummaryConstructors Constructor Description PipesReporter()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()No-op implementation.abstract voiderror(String msg)This is called if the process has crashed.abstract voiderror(Throwable t)This is called if the process has crashed.abstract voidreport(FetchEmitTuple t, PipesResult result, long elapsed)voidreport(TotalCountResult totalCountResult)No-op implementation.booleansupportsTotalCount()Override this if your reporter supports total count.
 
- 
- 
- 
Field Detail- 
NO_OP_REPORTERpublic static final PipesReporter NO_OP_REPORTER 
 
- 
 - 
Method Detail- 
reportpublic abstract void report(FetchEmitTuple t, PipesResult result, long elapsed) 
 - 
reportpublic void report(TotalCountResult totalCountResult) No-op implementation. Override for custom behavior and make sure to overridesupportsTotalCount()to returntrue- Parameters:
- totalCountResult-
 
 - 
supportsTotalCountpublic boolean supportsTotalCount() Override this if your reporter supports total count.- Returns:
- falseas the baseline implementation
 
 - 
closepublic void close() throws IOExceptionNo-op implementation. Override for custom behavior- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
 - 
errorpublic abstract void error(Throwable t) This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Parameters:
- t-
 
 - 
errorpublic abstract void error(String msg) This is called if the process has crashed. Implementers should not rely on close() to be called after this.- Parameters:
- msg-
 
 
- 
 
-