Module org.elasticsearch.server
Class TransportSimulateIndexTemplateAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.support.HandledTransportAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.support.master.TransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.support.master.TransportMasterNodeReadAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.admin.indices.template.post.TransportSimulateIndexTemplateAction
- All Implemented Interfaces:
ActionWithReservedState<SimulateIndexTemplateRequest>
public class TransportSimulateIndexTemplateAction
extends TransportMasterNodeReadAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
-
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
ConstructorsConstructorDescriptionTransportSimulateIndexTemplateAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, IndexSettingProviders indexSettingProviders) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckBlock(SimulateIndexTemplateRequest request, ClusterState state) protected voidmasterOperation(Task task, SimulateIndexTemplateRequest request, ClusterState state, ActionListener<SimulateIndexTemplateResponse> listener) static TemplateresolveTemplate(String matchingTemplate, String indexName, ClusterState simulatedState, boolean isDslOnlyMode, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, Set<IndexSettingProvider> indexSettingProviders) Take a template and index name as well as state where the template exists, and return a finalTemplatethat represents all the resolved Settings, Mappings, Aliases and Lifecyclestatic ClusterStateresolveTemporaryState(String matchingTemplate, String indexName, ClusterState simulatedState) Return a temporary cluster state with an index that exists using the matched template's settingsMethods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeReadAction
localExecuteMethods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
doExecuteMethods 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
modifiedKeys, reservedStateHandlerName, validateForReservedState
-
Constructor Details
-
TransportSimulateIndexTemplateAction
@Inject public TransportSimulateIndexTemplateAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, IndexSettingProviders indexSettingProviders)
-
-
Method Details
-
masterOperation
protected void masterOperation(Task task, SimulateIndexTemplateRequest request, ClusterState state, ActionListener<SimulateIndexTemplateResponse> listener) throws Exception - Specified by:
masterOperationin classTransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse> - Throws:
Exception
-
checkBlock
protected ClusterBlockException checkBlock(SimulateIndexTemplateRequest request, ClusterState state) - Specified by:
checkBlockin classTransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
-
resolveTemporaryState
public static ClusterState resolveTemporaryState(String matchingTemplate, String indexName, ClusterState simulatedState) Return a temporary cluster state with an index that exists using the matched template's settings -
resolveTemplate
public static Template resolveTemplate(String matchingTemplate, String indexName, ClusterState simulatedState, boolean isDslOnlyMode, NamedXContentRegistry xContentRegistry, IndicesService indicesService, SystemIndices systemIndices, Set<IndexSettingProvider> indexSettingProviders) throws Exception Take a template and index name as well as state where the template exists, and return a finalTemplatethat represents all the resolved Settings, Mappings, Aliases and Lifecycle- Throws:
Exception
-