Package org.apache.lucene.search
Class QueueSizeBasedExecutor
- java.lang.Object
-
- org.apache.lucene.search.SliceExecutor
-
- org.apache.lucene.search.QueueSizeBasedExecutor
-
class QueueSizeBasedExecutor extends SliceExecutor
Derivative of SliceExecutor that controls the number of active threads that are used for a single query. At any point, no more than (maximum pool size of the executor * LIMITING_FACTOR) tasks should be active. If the limit is exceeded, further segments are searched on the caller thread
-
-
Field Summary
Fields Modifier and Type Field Description private static double
LIMITING_FACTOR
private java.util.concurrent.ThreadPoolExecutor
threadPoolExecutor
-
Constructor Summary
Constructors Constructor Description QueueSizeBasedExecutor(java.util.concurrent.ThreadPoolExecutor threadPoolExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
invokeAll(java.util.Collection<? extends java.lang.Runnable> tasks)
-
Methods inherited from class org.apache.lucene.search.SliceExecutor
processTask
-
-
-
-
Field Detail
-
LIMITING_FACTOR
private static final double LIMITING_FACTOR
- See Also:
- Constant Field Values
-
threadPoolExecutor
private final java.util.concurrent.ThreadPoolExecutor threadPoolExecutor
-
-
Method Detail
-
invokeAll
public void invokeAll(java.util.Collection<? extends java.lang.Runnable> tasks)
- Overrides:
invokeAll
in classSliceExecutor
-
-