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, indexNameExpressionResolver, threadPool, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
Constructors Constructor Description TransportSimulateIndexTemplateAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexTemplateService indexTemplateService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, IndicesService indicesService) -
Method Summary
Modifier and Type Method Description protected ClusterBlockExceptioncheckBlock(SimulateIndexTemplateRequest request, ClusterState state)protected java.lang.Stringexecutor()protected voidmasterOperation(SimulateIndexTemplateRequest request, ClusterState state, ActionListener<SimulateIndexTemplateResponse> listener)protected SimulateIndexTemplateResponseread(StreamInput in)static TemplateresolveTemplate(java.lang.String matchingTemplate, java.lang.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(java.lang.String matchingTemplate, java.lang.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
-
executor
protected java.lang.String executor()- Specified by:
executorin classTransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
-
read
- Specified by:
readin classTransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>- Throws:
java.io.IOException
-
masterOperation
protected void masterOperation(SimulateIndexTemplateRequest request, ClusterState state, ActionListener<SimulateIndexTemplateResponse> listener) throws java.lang.Exception- Specified by:
masterOperationin classTransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>- Throws:
java.lang.Exception
-
checkBlock
protected ClusterBlockException checkBlock(SimulateIndexTemplateRequest request, ClusterState state)- Specified by:
checkBlockin classTransportMasterNodeAction<SimulateIndexTemplateRequest,SimulateIndexTemplateResponse>
-
resolveTemporaryState
public static ClusterState resolveTemporaryState(java.lang.String matchingTemplate, java.lang.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(java.lang.String matchingTemplate, java.lang.String indexName, ClusterState simulatedState, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, IndicesService indicesService, AliasValidator aliasValidator) throws java.lang.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:
java.lang.Exception
-