public abstract class TransportSingleShardAction<Request extends SingleShardRequest,Response extends ActionResponse> extends TransportAction<Request,Response>
Modifier and Type | Class and Description |
---|---|
protected class |
TransportSingleShardAction.InternalRequest
Internal request class that gets built on each node.
|
Modifier and Type | Field and Description |
---|---|
protected ClusterService |
clusterService |
protected TransportService |
transportService |
actionName, indexNameExpressionResolver, parseFieldMatcher, taskManager, threadPool
deprecationLogger, logger, settings
Modifier | Constructor and Description |
---|---|
protected |
TransportSingleShardAction(Settings settings,
String actionName,
ThreadPool threadPool,
ClusterService clusterService,
TransportService transportService,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
Class<Request> request,
String executor) |
Modifier and Type | Method and Description |
---|---|
protected ClusterBlockException |
checkGlobalBlock(ClusterState state) |
protected ClusterBlockException |
checkRequestBlock(ClusterState state,
TransportSingleShardAction.InternalRequest request) |
protected void |
doExecute(Request request,
ActionListener<Response> listener) |
protected boolean |
isSubAction()
Tells whether the action is a main one or a subaction.
|
protected abstract Response |
newResponse() |
protected abstract boolean |
resolveIndex(Request request) |
protected void |
resolveRequest(ClusterState state,
TransportSingleShardAction.InternalRequest request) |
protected abstract Response |
shardOperation(Request request,
ShardId shardId) |
protected abstract ShardsIterator |
shards(ClusterState state,
TransportSingleShardAction.InternalRequest request)
Returns the candidate shards to execute the operation on or
null the execute
the operation locally (the node that received the request) |
doExecute, execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
protected final ClusterService clusterService
protected final TransportService transportService
protected TransportSingleShardAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Class<Request> request, String executor)
protected boolean isSubAction()
protected void doExecute(Request request, ActionListener<Response> listener)
doExecute
in class TransportAction<Request extends SingleShardRequest,Response extends ActionResponse>
protected abstract Response newResponse()
protected abstract boolean resolveIndex(Request request)
protected ClusterBlockException checkGlobalBlock(ClusterState state)
protected ClusterBlockException checkRequestBlock(ClusterState state, TransportSingleShardAction.InternalRequest request)
protected void resolveRequest(ClusterState state, TransportSingleShardAction.InternalRequest request)
@Nullable protected abstract ShardsIterator shards(ClusterState state, TransportSingleShardAction.InternalRequest request)
null
the execute
the operation locally (the node that received the request)Copyright © 2009–2016. All rights reserved.