Class TransportMasterNodeAction<Request extends MasterNodeRequest<Request>,Response extends ActionResponse>
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.HandledTransportAction<Request,Response>
org.elasticsearch.action.support.master.TransportMasterNodeAction<Request,Response>
- Direct Known Subclasses:
AutoCreateAction.TransportAction
,CompletionPersistentTaskAction.TransportAction
,DeletePipelineTransportAction
,PutPipelineTransportAction
,RemovePersistentTaskAction.TransportAction
,StartPersistentTaskAction.TransportAction
,TransportAddIndexBlockAction
,TransportAddVotingConfigExclusionsAction
,TransportAutoPutMappingAction
,TransportCleanupRepositoryAction
,TransportClearVotingConfigExclusionsAction
,TransportCloseIndexAction
,TransportClusterAllocationExplainAction
,TransportClusterRerouteAction
,TransportClusterUpdateSettingsAction
,TransportCreateIndexAction
,TransportCreateSnapshotAction
,TransportDeleteComponentTemplateAction
,TransportDeleteComposableIndexTemplateAction
,TransportDeleteDanglingIndexAction
,TransportDeleteIndexAction
,TransportDeleteIndexTemplateAction
,TransportDeleteRepositoryAction
,TransportDeleteSnapshotAction
,TransportDeleteStoredScriptAction
,TransportGetSnapshotsAction
,TransportIndicesAliasesAction
,TransportMasterNodeReadAction
,TransportOpenIndexAction
,TransportPutComponentTemplateAction
,TransportPutComposableIndexTemplateAction
,TransportPutIndexTemplateAction
,TransportPutMappingAction
,TransportPutRepositoryAction
,TransportPutStoredScriptAction
,TransportResizeAction
,TransportRestoreSnapshotAction
,TransportRolloverAction
,TransportSnapshotsStatusAction
,TransportUpdateSettingsAction
,TransportUpgradeSettingsAction
,TransportVerifyRepositoryAction
,UpdatePersistentTaskStatusAction.TransportAction
public abstract class TransportMasterNodeAction<Request extends MasterNodeRequest<Request>,Response extends ActionResponse> extends HandledTransportAction<Request,Response>
A base class for operations that needs to be performed on the master node.
-
Field Summary
Fields Modifier and Type Field Description protected ClusterService
clusterService
protected IndexNameExpressionResolver
indexNameExpressionResolver
protected ThreadPool
threadPool
protected TransportService
transportService
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransportMasterNodeAction(java.lang.String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver)
protected
TransportMasterNodeAction(java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver)
-
Method Summary
Modifier and Type Method Description protected abstract ClusterBlockException
checkBlock(Request request, ClusterState state)
protected void
doExecute(Task task, Request request, ActionListener<Response> listener)
protected abstract java.lang.String
executor()
protected java.lang.String
getMasterActionName(DiscoveryNode node)
Allows to conditionally return a different master node action name in the case an action gets renamed.protected boolean
localExecute(Request request)
protected void
masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener)
Override this operation if access to the task parameter is neededprotected abstract void
masterOperation(Request request, ClusterState state, ActionListener<Response> listener)
protected abstract Response
read(StreamInput in)
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
-
Field Details
-
Constructor Details
-
TransportMasterNodeAction
protected TransportMasterNodeAction(java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver) -
TransportMasterNodeAction
protected TransportMasterNodeAction(java.lang.String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver)
-
-
Method Details
-
executor
protected abstract java.lang.String executor() -
read
- Throws:
java.io.IOException
-
masterOperation
protected abstract void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws java.lang.Exception- Throws:
java.lang.Exception
-
masterOperation
protected void masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener) throws java.lang.ExceptionOverride this operation if access to the task parameter is needed- Throws:
java.lang.Exception
-
localExecute
-
checkBlock
-
doExecute
- Specified by:
doExecute
in classTransportAction<Request extends MasterNodeRequest<Request>,Response extends ActionResponse>
-
getMasterActionName
Allows to conditionally return a different master node action name in the case an action gets renamed. This mainly for backwards compatibility should be used rarely
-