Class CallablePipesIterator
- java.lang.Object
-
- org.apache.tika.pipes.pipesiterator.CallablePipesIterator
-
-
Constructor Summary
Constructors 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_SEMAPHORE
to 1.CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis, int numConsumers)
-
-
-
Constructor Detail
-
CallablePipesIterator
public 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_SEMAPHORE
to 1. This means that your consumers must put the semaphore back in the queue after they finish.- Parameters:
pipesIterator
-queue
-
-
CallablePipesIterator
public CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis)
This sets the number ofPipesIterator.COMPLETED_SEMAPHORE
to 1. This means that your consumers must put the semaphore back in the queue after they finish.- Parameters:
pipesIterator
- underlying pipes iterator to usequeue
- queue to add the fetch emit tuples totimeoutMillis
- how long to try to offer the fetch emit tuples to the queue. If -1, this will block withArrayBlockingQueue.put(Object)
forever.
-
CallablePipesIterator
public CallablePipesIterator(PipesIterator pipesIterator, ArrayBlockingQueue<FetchEmitTuple> queue, long timeoutMillis, int numConsumers)
- Parameters:
pipesIterator
- underlying pipes iterator to usequeue
- queue to add the fetch emit tuples totimeoutMillis
- how long to try to offer the fetch emit tuples to the queue. If -1, this will block withArrayBlockingQueue.put(Object)
forever.numConsumers
- how manyPipesIterator.COMPLETED_SEMAPHORE
to 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
-
-