Class ExternalSliceQueue
java.lang.Object
org.elasticsearch.xpack.esql.datasources.ExternalSliceQueue
Thread-safe queue of
ExternalSplit instances for parallel external source execution.
Analogous to LuceneSliceQueue but simpler: splits are claimed sequentially
via nextSplit() until exhausted.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnextSplits(int max) Atomically claims up tomaxconsecutive splits.intReturns the approximate number of splits not yet claimed.int
-
Constructor Details
-
ExternalSliceQueue
-
-
Method Details
-
nextSplit
-
totalSlices
public int totalSlices() -
remaining
public int remaining()Returns the approximate number of splits not yet claimed. The value may be stale under concurrent access but is accurate enough for batch-size heuristics. -
nextSplits
Atomically claims up tomaxconsecutive splits. Returns an empty list when the queue is exhausted. The returned list may be smaller thanmaxwhen fewer splits remain.
-