Class CallablePipesIterator
- java.lang.Object
- 
- org.apache.tika.pipes.pipesiterator.CallablePipesIterator
 
- 
- 
Constructor SummaryConstructors Constructor Description CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue)This sets timeoutMillis to -1, meaning that this will block forever trying to add fetchemittuples to the queue.CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis)This sets the number ofPipesIterator.COMPLETED_SEMAPHOREto 1.CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis, int numConsumers)
 
- 
- 
- 
Constructor Detail- 
CallablePipesIteratorpublic CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue) This sets timeoutMillis to -1, meaning that this will block forever trying to add fetchemittuples to the queue. This sets the number ofPipesIterator.COMPLETED_SEMAPHOREto 1. This means that your consumers must put the semaphore back in the queue after they finish.- Parameters:
- pipesIterator-
- queue-
 
 - 
CallablePipesIteratorpublic CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis) This sets the number ofPipesIterator.COMPLETED_SEMAPHOREto 1. This means that your consumers must put the semaphore back in the queue after they finish.- Parameters:
- pipesIterator- underlying pipes iterator to use
- queue- queue to add the fetch emit tuples to
- timeoutMillis- how long to try to offer the fetch emit tuples to the queue. If -1, this will block with- ArrayBlockingQueue.put(Object)forever.
 
 - 
CallablePipesIteratorpublic CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis, int numConsumers) - Parameters:
- pipesIterator- underlying pipes iterator to use
- queue- queue to add the fetch emit tuples to
- timeoutMillis- how long to try to offer the fetch emit tuples to the queue. If -1, this will block with- ArrayBlockingQueue.put(Object)forever.
- numConsumers- how many- PipesIterator.COMPLETED_SEMAPHOREto add to the queue. If the consumers are adding this back to the queue when they find it, then this should be set to 1, otherwise, for a single semaphore for each consumer, set this to the number of consumers
 
 
- 
 
-