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
,TransportResetFeatureStateAction
,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
Modifier and TypeFieldDescriptionprotected ClusterService
protected String
protected IndexNameExpressionResolver
protected ThreadPool
protected TransportService
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, taskManager
-
Constructor Summary
ModifierConstructorDescriptionprotected
TransportMasterNodeAction(String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader<Response> response, String executor)
protected
TransportMasterNodeAction(String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader<Response> response, String executor)
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ClusterBlockException
checkBlock(Request request, ClusterState state)
protected void
doExecute(Task task, Request request, ActionListener<Response> listener)
protected String
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
-
Field Details
-
threadPool
-
transportService
-
clusterService
-
indexNameExpressionResolver
-
executor
-
-
Constructor Details
-
TransportMasterNodeAction
protected TransportMasterNodeAction(String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader<Response> response, String executor) -
TransportMasterNodeAction
protected TransportMasterNodeAction(String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader<Response> response, String executor)
-
-
Method Details
-
masterOperation
protected abstract void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception- Throws:
Exception
-
masterOperation
protected void masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener) throws ExceptionOverride this operation if access to the task parameter is needed- Throws:
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
-