Module org.elasticsearch.server
Class TransportPutComponentTemplateAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<PutComponentTemplateAction.Request,AcknowledgedResponse>
org.elasticsearch.action.support.HandledTransportAction<PutComponentTemplateAction.Request,AcknowledgedResponse>
org.elasticsearch.action.support.master.TransportMasterNodeAction<PutComponentTemplateAction.Request,AcknowledgedResponse>
org.elasticsearch.action.support.master.AcknowledgedTransportMasterNodeAction<PutComponentTemplateAction.Request>
org.elasticsearch.action.admin.indices.template.put.TransportPutComponentTemplateAction
- All Implemented Interfaces:
ActionWithReservedState<PutComponentTemplateAction.Request>
public class TransportPutComponentTemplateAction
extends AcknowledgedTransportMasterNodeAction<PutComponentTemplateAction.Request>
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
clusterService, executor, threadPool, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportPutComponentTemplateAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, IndexScopedSettings indexScopedSettings, ProjectResolver projectResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckBlock(PutComponentTemplateAction.Request request, ClusterState state) protected voidmasterOperation(Task task, PutComponentTemplateAction.Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener) Override this method to return the keys of the cluster state or cluster entities that are modified by the Request object.static ComponentTemplatenormalizeComponentTemplate(ComponentTemplate componentTemplate, IndexScopedSettings indexScopedSettings) Override this method if the master node action also has anReservedClusterStateHandlerinteraction.protected voidvalidateForReservedState(PutComponentTemplateAction.Request request, ClusterState state) Methods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
doExecute, localExecuteMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnlyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.reservedstate.ActionWithReservedState
validateForReservedState
-
Constructor Details
-
TransportPutComponentTemplateAction
@Inject public TransportPutComponentTemplateAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, IndexScopedSettings indexScopedSettings, ProjectResolver projectResolver)
-
-
Method Details
-
checkBlock
protected ClusterBlockException checkBlock(PutComponentTemplateAction.Request request, ClusterState state) - Specified by:
checkBlockin classTransportMasterNodeAction<PutComponentTemplateAction.Request,AcknowledgedResponse>
-
normalizeComponentTemplate
public static ComponentTemplate normalizeComponentTemplate(ComponentTemplate componentTemplate, IndexScopedSettings indexScopedSettings) -
masterOperation
protected void masterOperation(Task task, PutComponentTemplateAction.Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener) - Specified by:
masterOperationin classTransportMasterNodeAction<PutComponentTemplateAction.Request,AcknowledgedResponse>
-
reservedStateHandlerName
Description copied from interface:ActionWithReservedStateOverride this method if the master node action also has anReservedClusterStateHandlerinteraction.We need to check if certain settings or entities are allowed to be modified by the master node action, depending on if they are set as reserved in 'operator' mode (file based settings, modules, plugins).
- Returns:
- an Optional of the
ReservedClusterStateHandlername
-
modifiedKeys
Description copied from interface:ActionWithReservedStateOverride this method to return the keys of the cluster state or cluster entities that are modified by the Request object.This method is used by the reserved state handler logic (see
ReservedClusterStateHandler) to verify if the keys don't conflict with an existing key set as reserved.- Parameters:
request- the TransportMasterNode request- Returns:
- set of String keys intended to be modified/set/deleted by this request
-
validateForReservedState
protected void validateForReservedState(PutComponentTemplateAction.Request request, ClusterState state)
-