Package org.apache.tika.pipes.async
Class AsyncProcessor
java.lang.Object
org.apache.tika.pipes.async.AsyncProcessor
- All Implemented Interfaces:
Closeable,AutoCloseable
This is the main class for handling async requests. This manages
AsyncClients and AsyncEmitters.
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncProcessor(Path tikaConfigPath) AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclose()voidfinished()intlongbooleanoffer(List<FetchEmitTuple> newFetchEmitTuples, long offerMs) booleanoffer(FetchEmitTuple t, long offerMs)
-
Constructor Details
-
AsyncProcessor
- Throws:
TikaExceptionIOException
-
AsyncProcessor
public AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator) throws TikaException, IOException - Throws:
TikaExceptionIOException
-
-
Method Details
-
offer
public boolean offer(List<FetchEmitTuple> newFetchEmitTuples, long offerMs) throws PipesException, InterruptedException - Throws:
PipesExceptionInterruptedException
-
getCapacity
public int getCapacity() -
offer
- Throws:
PipesExceptionInterruptedException
-
finished
- Throws:
InterruptedException
-
checkActive
- Throws:
InterruptedException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getTotalProcessed
public long getTotalProcessed()
-