Class ListTasksResponse
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportResponse
org.elasticsearch.action.ActionResponse
org.elasticsearch.action.support.tasks.BaseTasksResponse
org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse
- 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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.ActionResponse
ActionResponse.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.action.support.tasks.BaseTasksResponse
NODE_FAILURES, TASK_FAILURESFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionListTasksResponse(List<TaskInfo> tasks, List<TaskOperationFailure> taskFailures, List<? extends ElasticsearchException> nodeFailures) -
Method Summary
Modifier and TypeMethodDescriptionstatic ListTasksResponsefromXContent(org.elasticsearch.common.xcontent.XContentParser parser)Returns the list of tasks by nodeGet the tasks found by this request grouped by parent tasks.getTasks()Get the tasks found by this request.protected static <T> org.elasticsearch.common.xcontent.ConstructingObjectParser<T,Void>setupParser(String name, TriFunction<List<TaskInfo>,List<TaskOperationFailure>,List<ElasticsearchException>,T> ctor)toString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)org.elasticsearch.common.xcontent.XContentBuildertoXContentGroupedByNode(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params, DiscoveryNodes discoveryNodes)Convert this task response to XContent grouping by executing nodes.org.elasticsearch.common.xcontent.XContentBuildertoXContentGroupedByNone(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)Presents a flat list of tasksorg.elasticsearch.common.xcontent.XContentBuildertoXContentGroupedByParents(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)Convert this response to XContent grouping by parent tasks.voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.tasks.BaseTasksResponse
equals, getNodeFailures, getTaskFailures, hashCode, rethrowFailures, toXContentCommonMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
ListTasksResponse
public ListTasksResponse(List<TaskInfo> tasks, List<TaskOperationFailure> taskFailures, List<? extends ElasticsearchException> nodeFailures) -
ListTasksResponse
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBaseTasksResponse- 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
Returns the list of tasks by node -
getTaskGroups
Get the tasks found by this request grouped by parent tasks. -
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 IOExceptionConvert 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 IOExceptionConvert 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 IOExceptionPresents 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:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
fromXContent
public static ListTasksResponse fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) -
toString
-