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
ConstructorDescriptionAsyncProcessor
(Path tikaConfigPath) AsyncProcessor
(Path tikaConfigPath, PipesIterator pipesIterator) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
close()
void
finished()
int
long
boolean
offer
(List<FetchEmitTuple> newFetchEmitTuples, long offerMs) boolean
offer
(FetchEmitTuple t, long offerMs)
-
Constructor Details
-
AsyncProcessor
- Throws:
TikaException
IOException
-
AsyncProcessor
public AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator) throws TikaException, IOException - Throws:
TikaException
IOException
-
-
Method Details
-
offer
public boolean offer(List<FetchEmitTuple> newFetchEmitTuples, long offerMs) throws PipesException, InterruptedException - Throws:
PipesException
InterruptedException
-
getCapacity
public int getCapacity() -
offer
- Throws:
PipesException
InterruptedException
-
finished
- Throws:
InterruptedException
-
checkActive
- Throws:
InterruptedException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getTotalProcessed
public long getTotalProcessed()
-