Request
- the underlying client requestResponse
- the response to the client requestShardOperationResult
- per-shard operation resultspublic abstract class TransportBroadcastByNodeAction<Request extends BroadcastRequest,Response extends BroadcastResponse,ShardOperationResult extends Streamable> extends HandledTransportAction<Request,Response>
Modifier and Type | Class and Description |
---|---|
protected class |
TransportBroadcastByNodeAction.AsyncAction |
static class |
TransportBroadcastByNodeAction.EmptyResult
Can be used for implementations of
shardOperation for
which there is no shard-level return value. |
class |
TransportBroadcastByNodeAction.NodeRequest |
actionName, indexNameExpressionResolver, parseFieldMatcher, taskManager, threadPool
deprecationLogger, logger, settings
Constructor and Description |
---|
TransportBroadcastByNodeAction(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 abstract ClusterBlockException |
checkGlobalBlock(ClusterState state,
Request request)
Executes a global block check before polling the cluster state.
|
protected abstract ClusterBlockException |
checkRequestBlock(ClusterState state,
Request request,
String[] concreteIndices)
Executes a global request-level check before polling the cluster state.
|
protected void |
doExecute(Request request,
ActionListener<Response> listener) |
protected void |
doExecute(Task task,
Request request,
ActionListener<Response> listener) |
protected abstract Response |
newResponse(Request request,
int totalShards,
int successfulShards,
int failedShards,
List<ShardOperationResult> results,
List<ShardOperationFailedException> shardFailures,
ClusterState clusterState)
Creates a new response to the underlying request.
|
protected abstract Request |
readRequestFrom(StreamInput in)
Deserialize a request from an input stream
|
protected abstract ShardOperationResult |
readShardResult(StreamInput in)
Deserialize a shard-level result from an input stream
|
protected abstract ShardOperationResult |
shardOperation(Request request,
ShardRouting shardRouting)
Executes the shard-level operation.
|
protected abstract ShardsIterator |
shards(ClusterState clusterState,
Request request,
String[] concreteIndices)
Determines the shards on which this operation will be executed on.
|
execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
public TransportBroadcastByNodeAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Class<Request> request, String executor)
protected abstract ShardOperationResult readShardResult(StreamInput in) throws IOException
in
- input streamIOException
protected abstract Response newResponse(Request request, int totalShards, int successfulShards, int failedShards, List<ShardOperationResult> results, List<ShardOperationFailedException> shardFailures, ClusterState clusterState)
request
- the underlying requesttotalShards
- the total number of shards considered for execution of the operationsuccessfulShards
- the total number of shards for which execution of the operation was successfulfailedShards
- the total number of shards for which execution of the operation failedresults
- the per-node aggregated shard-level resultsshardFailures
- the exceptions corresponding to shard operationa failuresclusterState
- the cluster stateprotected abstract Request readRequestFrom(StreamInput in) throws IOException
in
- input streamIOException
protected abstract ShardOperationResult shardOperation(Request request, ShardRouting shardRouting) throws IOException
request
- the node-level requestshardRouting
- the shard on which to execute the operationIOException
protected abstract ShardsIterator shards(ClusterState clusterState, Request request, String[] concreteIndices)
clusterState
- the cluster staterequest
- the underlying requestconcreteIndices
- the concrete indices on which to execute the operationprotected abstract ClusterBlockException checkGlobalBlock(ClusterState state, Request request)
state
- the cluster staterequest
- the underlying requestprotected abstract ClusterBlockException checkRequestBlock(ClusterState state, Request request, String[] concreteIndices)
state
- the cluster staterequest
- the underlying requestconcreteIndices
- the concrete indices on which to execute the operationprotected final void doExecute(Request request, ActionListener<Response> listener)
doExecute
in class TransportAction<Request extends BroadcastRequest,Response extends BroadcastResponse>
protected void doExecute(Task task, Request request, ActionListener<Response> listener)
doExecute
in class TransportAction<Request extends BroadcastRequest,Response extends BroadcastResponse>
Copyright © 2009–2016. All rights reserved.