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>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.action.support.HandledTransportAction
HandledTransportAction.ChannelActionListener<Response extends TransportResponse,Request extends TransportRequest>
-
-
Field Summary
Fields Modifier and Type Field Description protected ClusterService
clusterService
protected IndexNameExpressionResolver
indexNameExpressionResolver
protected ThreadPool
threadPool
protected TransportService
transportService
-
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
logger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransportInstanceSingleOperationAction(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(Task task, 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.action.support.TransportAction
execute, execute, execute
-
-
-
-
Field Detail
-
threadPool
protected final ThreadPool threadPool
-
clusterService
protected final ClusterService clusterService
-
transportService
protected final TransportService transportService
-
indexNameExpressionResolver
protected final IndexNameExpressionResolver indexNameExpressionResolver
-
-
Constructor Detail
-
TransportInstanceSingleOperationAction
protected TransportInstanceSingleOperationAction(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(Task task, 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!
-
-