All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, org.elasticsearch.core.RefCounted
Direct Known Subclasses:
CancelTasksResponse

public class ListTasksResponse extends BaseTasksResponse implements org.elasticsearch.common.xcontent.ToXContentObject
Returns the list of tasks currently running on the nodes
  • Constructor Details

  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class BaseTasksResponse
      Throws:
      IOException
    • setupParser

      protected static <T> org.elasticsearch.common.xcontent.ConstructingObjectParser<T,​Void> setupParser(String name, TriFunction<List<TaskInfo>,​List<TaskOperationFailure>,​List<ElasticsearchException>,​T> ctor)
    • getPerNodeTasks

      public Map<String,​List<TaskInfo>> getPerNodeTasks()
      Returns the list of tasks by node
    • getTaskGroups

      public List<TaskGroup> getTaskGroups()
      Get the tasks found by this request grouped by parent tasks.
    • getTasks

      public List<TaskInfo> getTasks()
      Get the tasks found by this request.
    • toXContentGroupedByNode

      public org.elasticsearch.common.xcontent.XContentBuilder toXContentGroupedByNode(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params, DiscoveryNodes discoveryNodes) throws IOException
      Convert this task response to XContent grouping by executing nodes.
      Throws:
      IOException
    • toXContentGroupedByParents

      public org.elasticsearch.common.xcontent.XContentBuilder toXContentGroupedByParents(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Convert this response to XContent grouping by parent tasks.
      Throws:
      IOException
    • toXContentGroupedByNone

      public org.elasticsearch.common.xcontent.XContentBuilder toXContentGroupedByNone(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Presents a flat list of tasks
      Throws:
      IOException
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static ListTasksResponse fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
    • toString

      public String toString()
      Overrides:
      toString in class Object