Module org.elasticsearch.server
Class ActiveFetchPhaseTasks
java.lang.Object
org.elasticsearch.search.fetch.chunk.ActiveFetchPhaseTasks
Manages the registry of active fetch response streams on the coordinator node.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.search.fetch.chunk.FetchPhaseResponseStreamacquireResponseStream(long coordinatingTaskId, ShardId shardId) Acquires the response stream for the given coordinating task and shard, incrementing its reference count.
-
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 byTransportFetchPhaseResponseChunkActionfor each arriving chunk. The caller must callAbstractRefCounted.decRef()when done processing the chunk.- Parameters:
coordinatingTaskId- the ID of the coordinating search taskshardId- the shard ID- Returns:
- the response stream with an incremented reference count
- Throws:
ResourceNotFoundException- if the task is not registered or has already completed
-