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:
AcknowledgedTransportMasterNodeAction
,AutoCreateAction.TransportAction
,CompletionPersistentTaskAction.TransportAction
,RemovePersistentTaskAction.TransportAction
,StartPersistentTaskAction.TransportAction
,TransportAddIndexBlockAction
,TransportAddVotingConfigExclusionsAction
,TransportCleanupRepositoryAction
,TransportClearVotingConfigExclusionsAction
,TransportCloseIndexAction
,TransportClusterAllocationExplainAction
,TransportClusterRerouteAction
,TransportClusterUpdateSettingsAction
,TransportCreateIndexAction
,TransportCreateSnapshotAction
,TransportGetSnapshotsAction
,TransportMasterNodeReadAction
,TransportOpenIndexAction
,TransportResizeAction
,TransportRestoreSnapshotAction
,TransportRolloverAction
,TransportSnapshotsStatusAction
,TransportSnapshottableFeaturesAction
,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 java.lang.String
executor
protected IndexNameExpressionResolver
indexNameExpressionResolver
protected ThreadPool
threadPool
protected TransportService
transportService
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, 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, Writeable.Reader<Response> response, java.lang.String executor)
protected
TransportMasterNodeAction(java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader<Response> response, java.lang.String executor)
-
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 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)
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
threadPool
-
transportService
-
clusterService
-
indexNameExpressionResolver
-
executor
protected final java.lang.String executor
-
-
Constructor Details
-
TransportMasterNodeAction
protected TransportMasterNodeAction(java.lang.String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader<Response> response, java.lang.String executor) -
TransportMasterNodeAction
protected TransportMasterNodeAction(java.lang.String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader<Response> response, java.lang.String executor)
-
-
Method Details
-
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
-