Class ActiveFetchPhaseTasks

java.lang.Object
org.elasticsearch.search.fetch.chunk.ActiveFetchPhaseTasks

public final class ActiveFetchPhaseTasks extends Object
Manages the registry of active fetch response streams on the coordinator node.
  • Constructor Details

    • ActiveFetchPhaseTasks

      public ActiveFetchPhaseTasks()
  • Method Details

    • acquireResponseStream

      public org.elasticsearch.search.fetch.chunk.FetchPhaseResponseStream acquireResponseStream(long coordinatingTaskId, ShardId shardId)
      Acquires the response stream for the given coordinating task and shard, incrementing its reference count. This method is called by TransportFetchPhaseResponseChunkAction for each arriving chunk. The caller must call AbstractRefCounted.decRef() when done processing the chunk.
      Parameters:
      coordinatingTaskId - the ID of the coordinating search task
      shardId - the shard ID
      Returns:
      the response stream with an incremented reference count
      Throws:
      ResourceNotFoundException - if the task is not registered or has already completed