Class TransportSimulateIndexTemplateAction
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>
org.elasticsearch.action.support.master.TransportMasterNodeReadAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
org.elasticsearch.action.admin.indices.template.post.TransportSimulateIndexTemplateAction
public class TransportSimulateIndexTemplateAction
extends TransportMasterNodeReadAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
clusterService, executor, indexNameExpressionResolver, threadPool, transportService
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, taskManager
-
Constructor Summary
ConstructorDescriptionTransportSimulateIndexTemplateAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, IndicesService indicesService)
-
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockException
checkBlock(SimulateIndexTemplateRequest request, ClusterState state)
protected void
masterOperation(SimulateIndexTemplateRequest request, ClusterState state, ActionListener<SimulateIndexTemplateResponse> listener)
static Template
resolveTemplate(String matchingTemplate, String indexName, ClusterState simulatedState, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, IndicesService indicesService, AliasValidator aliasValidator)
Take a template and index name as well as state where the template exists, and return a finalTemplate
that represents all the resolved Settings, Mappings, and Aliasesstatic ClusterState
resolveTemporaryState(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
localExecute
Methods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
doExecute, getMasterActionName, masterOperation
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
-
Constructor Details
-
TransportSimulateIndexTemplateAction
@Inject public TransportSimulateIndexTemplateAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, IndicesService indicesService)
-
-
Method Details
-
masterOperation
protected void masterOperation(SimulateIndexTemplateRequest request, ClusterState state, ActionListener<SimulateIndexTemplateResponse> listener) throws Exception- Specified by:
masterOperation
in classTransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
- Throws:
Exception
-
checkBlock
protected ClusterBlockException checkBlock(SimulateIndexTemplateRequest request, ClusterState state)- Specified by:
checkBlock
in 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, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, IndicesService indicesService, AliasValidator aliasValidator) throws ExceptionTake a template and index name as well as state where the template exists, and return a finalTemplate
that represents all the resolved Settings, Mappings, and Aliases- Throws:
Exception
-