Class TopQueriesResponse
java.lang.Object
org.opensearch.core.transport.TransportMessage
org.opensearch.core.transport.TransportResponse
org.opensearch.core.action.ActionResponse
org.opensearch.action.support.nodes.BaseNodesResponse<TopQueries>
org.opensearch.plugin.insights.rules.action.top_queries.TopQueriesResponse
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentFragment
public class TopQueriesResponse
extends BaseNodesResponse<TopQueries>
implements org.opensearch.core.xcontent.ToXContentFragment
Transport response for cluster/node level top queries information.
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.core.transport.TransportResponse
org.opensearch.core.transport.TransportResponse.EmptyNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTopQueriesResponse(ClusterName clusterName, List<TopQueries> nodes, List<FailedNodeException> failures, int top_n_size, MetricType metricType) Constructor for TopQueriesResponseTopQueriesResponse(org.opensearch.core.common.io.stream.StreamInput in) Constructor for TopQueriesResponse. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<TopQueries> readNodesFrom(org.opensearch.core.common.io.stream.StreamInput in) toString()org.opensearch.core.xcontent.XContentBuildertoXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) protected voidwriteNodesTo(org.opensearch.core.common.io.stream.StreamOutput out, List<TopQueries> nodes) Methods inherited from class org.opensearch.action.support.nodes.BaseNodesResponse
failures, getClusterName, getNodes, getNodesMap, hasFailures, writeToMethods inherited from class org.opensearch.core.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
TopQueriesResponse
Constructor for TopQueriesResponse.- Parameters:
in- AStreamInputobject.- Throws:
IOException- if the stream cannot be deserialized.
-
TopQueriesResponse
public TopQueriesResponse(ClusterName clusterName, List<TopQueries> nodes, List<FailedNodeException> failures, int top_n_size, MetricType metricType) Constructor for TopQueriesResponse- Parameters:
clusterName- The current cluster namenodes- A list that contains top queries results from all nodesfailures- A list that contains FailedNodeExceptiontop_n_size- The top N size to return to the usermetricType- theMetricTypeto be returned in this response
-
-
Method Details
-
readNodesFrom
protected List<TopQueries> readNodesFrom(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Specified by:
readNodesFromin classBaseNodesResponse<TopQueries>- Throws:
IOException
-
writeNodesTo
protected void writeNodesTo(org.opensearch.core.common.io.stream.StreamOutput out, List<TopQueries> nodes) throws IOException - Specified by:
writeNodesToin classBaseNodesResponse<TopQueries>- Throws:
IOException
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.opensearch.core.xcontent.ToXContent- Throws:
IOException
-
toString
-