Class TransportMasterNodeAction<Request extends MasterNodeRequest<Request>,Response extends ActionResponse>
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- 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:
CompletionPersistentTaskAction.TransportAction
,DeletePipelineTransportAction
,PutPipelineTransportAction
,RemovePersistentTaskAction.TransportAction
,StartPersistentTaskAction.TransportAction
,TransportCloseIndexAction
,TransportClusterAllocationExplainAction
,TransportClusterRerouteAction
,TransportClusterUpdateSettingsAction
,TransportCreateIndexAction
,TransportCreateSnapshotAction
,TransportDeleteIndexAction
,TransportDeleteIndexTemplateAction
,TransportDeleteRepositoryAction
,TransportDeleteSnapshotAction
,TransportDeleteStoredScriptAction
,TransportGetSnapshotsAction
,TransportIndicesAliasesAction
,TransportMasterNodeReadAction
,TransportOpenIndexAction
,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 TransportService
transportService
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, indexNameExpressionResolver, taskManager, threadPool
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransportMasterNodeAction(Settings settings, java.lang.String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request)
protected
TransportMasterNodeAction(Settings settings, java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ClusterBlockException
checkBlock(Request request, ClusterState state)
protected void
doExecute(Task task, Request request, ActionListener<Response> listener)
protected void
doExecute(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
newResponse()
-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
logDeprecatedSetting, logRemovedSetting, nodeName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute, execute
-
-
-
-
Field Detail
-
transportService
protected final TransportService transportService
-
clusterService
protected final ClusterService clusterService
-
-
Constructor Detail
-
TransportMasterNodeAction
protected TransportMasterNodeAction(Settings settings, java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request)
-
TransportMasterNodeAction
protected TransportMasterNodeAction(Settings settings, java.lang.String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request)
-
-
Method Detail
-
executor
protected abstract java.lang.String executor()
-
newResponse
protected abstract Response newResponse()
-
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.Exception
Override this operation if access to the task parameter is needed- Throws:
java.lang.Exception
-
localExecute
protected boolean localExecute(Request request)
-
checkBlock
protected abstract ClusterBlockException checkBlock(Request request, ClusterState state)
-
doExecute
protected final void doExecute(Request request, ActionListener<Response> listener)
- Specified by:
doExecute
in classTransportAction<Request extends MasterNodeRequest<Request>,Response extends ActionResponse>
-
doExecute
protected void doExecute(Task task, Request request, ActionListener<Response> listener)
- Overrides:
doExecute
in classTransportAction<Request extends MasterNodeRequest<Request>,Response extends ActionResponse>
-
getMasterActionName
protected java.lang.String getMasterActionName(DiscoveryNode node)
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
-
-