Class TransportInstanceSingleOperationAction<Request extends InstanceShardOperationRequest<Request>,Response extends ActionResponse>
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.action.support.TransportAction<Request,Response>
-
- org.elasticsearch.action.support.HandledTransportAction<Request,Response>
-
- org.elasticsearch.action.support.single.instance.TransportInstanceSingleOperationAction<Request,Response>
-
- Direct Known Subclasses:
TransportUpdateAction
public abstract class TransportInstanceSingleOperationAction<Request extends InstanceShardOperationRequest<Request>,Response extends ActionResponse> extends HandledTransportAction<Request,Response>
-
-
Field Summary
Fields Modifier and Type Field Description protected ClusterService
clusterService
protected TransportService
transportService
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, indexNameExpressionResolver, taskManager, threadPool
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransportInstanceSingleOperationAction(Settings settings, java.lang.String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ClusterBlockException
checkGlobalBlock(ClusterState state)
protected ClusterBlockException
checkRequestBlock(ClusterState state, Request request)
protected void
doExecute(Request request, ActionListener<Response> listener)
protected abstract java.lang.String
executor()
protected abstract Response
newResponse()
protected abstract void
resolveRequest(ClusterState state, Request request)
Resolves the request.protected boolean
retryOnFailure(java.lang.Exception e)
protected abstract void
shardOperation(Request request, ActionListener<Response> listener)
protected abstract ShardIterator
shards(ClusterState clusterState, Request request)
Should return an iterator with a single shard!protected TransportRequestOptions
transportOptions()
-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
logDeprecatedSetting, logRemovedSetting, nodeName
-
-
-
-
Field Detail
-
clusterService
protected final ClusterService clusterService
-
transportService
protected final TransportService transportService
-
-
Constructor Detail
-
TransportInstanceSingleOperationAction
protected TransportInstanceSingleOperationAction(Settings settings, java.lang.String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request)
-
-
Method Detail
-
doExecute
protected void doExecute(Request request, ActionListener<Response> listener)
- Specified by:
doExecute
in classTransportAction<Request extends InstanceShardOperationRequest<Request>,Response extends ActionResponse>
-
executor
protected abstract java.lang.String executor()
-
shardOperation
protected abstract void shardOperation(Request request, ActionListener<Response> listener)
-
newResponse
protected abstract Response newResponse()
-
checkGlobalBlock
protected ClusterBlockException checkGlobalBlock(ClusterState state)
-
checkRequestBlock
protected ClusterBlockException checkRequestBlock(ClusterState state, Request request)
-
resolveRequest
protected abstract void resolveRequest(ClusterState state, Request request)
Resolves the request. Throws an exception if the request cannot be resolved.
-
retryOnFailure
protected boolean retryOnFailure(java.lang.Exception e)
-
transportOptions
protected TransportRequestOptions transportOptions()
-
shards
protected abstract ShardIterator shards(ClusterState clusterState, Request request)
Should return an iterator with a single shard!
-
-