Class IterationResult<JobPosition>

java.lang.Object
org.elasticsearch.xpack.core.indexing.IterationResult<JobPosition>

public class IterationResult<JobPosition> extends Object
Result object to hold the result of 1 iteration of iterative indexing. Acts as an interface between the implementation and the generic indexer.
  • Constructor Details

    • IterationResult

      public IterationResult(Stream<IndexRequest> toIndex, JobPosition position, boolean isDone)
      Constructor for the result of 1 iteration.
      Parameters:
      toIndex - the stream of requests to be indexed
      position - the extracted, persistable position of the job required for the search phase
      isDone - true if source is exhausted and job should go to sleep Note: toIndex.empty() != isDone due to possible filtering in the specific implementation
  • Method Details

    • isDone

      public boolean isDone()
      Returns true if this indexing iteration is done and job should go into sleep mode.
    • getPosition

      public JobPosition getPosition()
      Return the position of the job, a generic to be passed to the next query construction.
      Returns:
      the position
    • getToIndex

      public Stream<IndexRequest> getToIndex()
      Stream of requests to be passed to bulk indexing.
      Returns:
      Stream of index requests.