Module org.elasticsearch.server
Class TransportClusterStatsAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<ClusterStatsRequest,ClusterStatsResponse>
org.elasticsearch.action.support.nodes.TransportNodesAction<ClusterStatsRequest,ClusterStatsResponse,TransportClusterStatsAction.ClusterStatsNodeRequest,ClusterStatsNodeResponse,SubscribableListener<TransportClusterStatsAction.AdditionalStats>>
org.elasticsearch.action.admin.cluster.stats.TransportClusterStatsAction
public class TransportClusterStatsAction
extends TransportNodesAction<ClusterStatsRequest,ClusterStatsResponse,TransportClusterStatsAction.ClusterStatsNodeRequest,ClusterStatsNodeResponse,SubscribableListener<TransportClusterStatsAction.AdditionalStats>>
Transport action implementing _cluster/stats API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classstatic class -
Field Summary
FieldsFields inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
clusterService, transportNodeAction, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportClusterStatsAction(ThreadPool threadPool, ClusterService clusterService, TransportService transportService, Client client, NodeService nodeService, IndicesService indicesService, RepositoriesService repositoriesService, UsageService usageService, ActionFilters actionFilters, Settings settings) -
Method Summary
Modifier and TypeMethodDescriptioncreateActionContext(Task task, ClusterStatsRequest request) Create an (optional)TransportNodesAction: called when starting to execute this action, and the result passed toTransportNodesAction.newResponseAsync(org.elasticsearch.tasks.Task, NodesRequest, ActionContext, java.util.List<NodeResponse>, java.util.List<org.elasticsearch.action.FailedNodeException>, org.elasticsearch.action.ActionListener<NodesResponse>)on completion.newNodeRequest(ClusterStatsRequest request) protected ClusterStatsNodeResponsenewNodeResponse(StreamInput in, DiscoveryNode node) protected ClusterStatsResponsenewResponse(ClusterStatsRequest request, List<ClusterStatsNodeResponse> responses, List<FailedNodeException> failures) Create a newTransportNodesAction.protected voidnewResponseAsync(Task task, ClusterStatsRequest request, SubscribableListener<TransportClusterStatsAction.AdditionalStats> additionalStatsListener, List<ClusterStatsNodeResponse> responses, List<FailedNodeException> failures, ActionListener<ClusterStatsResponse> listener) Create a newTransportNodesAction, possibly asynchronously.protected ClusterStatsNodeResponsenodeOperation(TransportClusterStatsAction.ClusterStatsNodeRequest nodeRequest, Task task) Implements the request recipient logic.Methods inherited from class org.elasticsearch.action.support.nodes.TransportNodesAction
doExecute, nodeOperationAsync, resolveRequestMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Field Details
-
TYPE
-
-
Constructor Details
-
TransportClusterStatsAction
@Inject public TransportClusterStatsAction(ThreadPool threadPool, ClusterService clusterService, TransportService transportService, Client client, NodeService nodeService, IndicesService indicesService, RepositoriesService repositoriesService, UsageService usageService, ActionFilters actionFilters, Settings settings)
-
-
Method Details
-
createActionContext
protected SubscribableListener<TransportClusterStatsAction.AdditionalStats> createActionContext(Task task, ClusterStatsRequest request) Description copied from class:TransportNodesActionCreate an (optional)TransportNodesAction: called when starting to execute this action, and the result passed toTransportNodesAction.newResponseAsync(org.elasticsearch.tasks.Task, NodesRequest, ActionContext, java.util.List<NodeResponse>, java.util.List<org.elasticsearch.action.FailedNodeException>, org.elasticsearch.action.ActionListener<NodesResponse>)on completion. NB runs on the transport worker thread, must not do anything expensive without dispatching to a different executor. -
newResponseAsync
protected void newResponseAsync(Task task, ClusterStatsRequest request, SubscribableListener<TransportClusterStatsAction.AdditionalStats> additionalStatsListener, List<ClusterStatsNodeResponse> responses, List<FailedNodeException> failures, ActionListener<ClusterStatsResponse> listener) Description copied from class:TransportNodesActionCreate a newTransportNodesAction, possibly asynchronously. The default implementation is synchronous and callsTransportNodesAction.newResponse(BaseNodesRequest, List, List). This method is executed onTransportNodesAction.finalExecutor.- Overrides:
newResponseAsyncin classTransportNodesAction<ClusterStatsRequest,ClusterStatsResponse, TransportClusterStatsAction.ClusterStatsNodeRequest, ClusterStatsNodeResponse, SubscribableListener<TransportClusterStatsAction.AdditionalStats>> - Parameters:
request- The request whose response we are constructing.TransportNodesActionmay have already released all its references to this object before calling this method, so it's up to individual implementations to retain their own reference to the request if still needed here.
-
newResponse
protected ClusterStatsResponse newResponse(ClusterStatsRequest request, List<ClusterStatsNodeResponse> responses, List<FailedNodeException> failures) Description copied from class:TransportNodesActionCreate a newTransportNodesAction. This method is executed onTransportNodesAction.finalExecutor.- Specified by:
newResponsein classTransportNodesAction<ClusterStatsRequest,ClusterStatsResponse, TransportClusterStatsAction.ClusterStatsNodeRequest, ClusterStatsNodeResponse, SubscribableListener<TransportClusterStatsAction.AdditionalStats>> - Parameters:
request- The request whose response we are constructing.TransportNodesActionmay have already released all its references to this object before calling this method, so it's up to individual implementations to retain their own reference to the request if still needed here.responses- All successful node-level responses.failures- All node-level failures.- Returns:
- Never
null.
-
newNodeRequest
protected TransportClusterStatsAction.ClusterStatsNodeRequest newNodeRequest(ClusterStatsRequest request) -
newNodeResponse
protected ClusterStatsNodeResponse newNodeResponse(StreamInput in, DiscoveryNode node) throws IOException -
nodeOperation
protected ClusterStatsNodeResponse nodeOperation(TransportClusterStatsAction.ClusterStatsNodeRequest nodeRequest, Task task) Description copied from class:TransportNodesActionImplements the request recipient logic. If access to the request listener is needed, overrideTransportNodesAction.nodeOperationAsync(TransportRequest, Task, ActionListener).
-