Package org.apache.tika.pipes.async
Class AsyncProcessor
- java.lang.Object
-
- org.apache.tika.pipes.async.AsyncProcessor
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class AsyncProcessor extends Object implements Closeable
This is the main class for handling async requests. This manages AsyncClients and AsyncEmitters.
-
-
Constructor Summary
Constructors Constructor Description AsyncProcessor(Path tikaConfigPath)
AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkActive()
void
close()
void
finished()
int
getCapacity()
long
getTotalProcessed()
boolean
offer(List<FetchEmitTuple> newFetchEmitTuples, long offerMs)
boolean
offer(FetchEmitTuple t, long offerMs)
-
-
-
Constructor Detail
-
AsyncProcessor
public AsyncProcessor(Path tikaConfigPath) throws TikaException, IOException
- Throws:
TikaException
IOException
-
AsyncProcessor
public AsyncProcessor(Path tikaConfigPath, PipesIterator pipesIterator) throws TikaException, IOException
- Throws:
TikaException
IOException
-
-
Method Detail
-
offer
public boolean offer(List<FetchEmitTuple> newFetchEmitTuples, long offerMs) throws PipesException, InterruptedException
- Throws:
PipesException
InterruptedException
-
getCapacity
public int getCapacity()
-
offer
public boolean offer(FetchEmitTuple t, long offerMs) throws PipesException, InterruptedException
- Throws:
PipesException
InterruptedException
-
finished
public void finished() throws InterruptedException
- Throws:
InterruptedException
-
checkActive
public boolean checkActive() throws InterruptedException
- Throws:
InterruptedException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getTotalProcessed
public long getTotalProcessed()
-
-