Class ExternalSliceQueue

java.lang.Object
org.elasticsearch.xpack.esql.datasources.ExternalSliceQueue

public final class ExternalSliceQueue extends Object
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 Details

  • Method Details

    • nextSplit

      @Nullable public ExternalSplit 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

      public List<ExternalSplit> nextSplits(int max)
      Atomically claims up to max consecutive splits. Returns an empty list when the queue is exhausted. The returned list may be smaller than max when fewer splits remain.