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, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportSimulateIndexTemplateAction(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 ClusterBlockExceptioncheckBlock(SimulateIndexTemplateRequest request, ClusterState state)protected voidmasterOperation(SimulateIndexTemplateRequest request, ClusterState state, ActionListener<SimulateIndexTemplateResponse> listener)static TemplateresolveTemplate(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 finalTemplatethat represents all the resolved Settings, Mappings, and Aliasesstatic 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
doExecute, getMasterActionName, masterOperationMethods 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:
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, 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 finalTemplatethat represents all the resolved Settings, Mappings, and Aliases- Throws:
Exception
-