Request
- the underlying client requestResponse
- the response to the client requestShardOperationResult
- per-shard operation resultspublic abstract class TransportBroadcastByNodeAction<Request extends BroadcastRequest<Request>,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, taskManager, threadPool
deprecationLogger, logger, settings
Constructor and Description |
---|
TransportBroadcastByNodeAction(Settings settings,
java.lang.String actionName,
ThreadPool threadPool,
ClusterService clusterService,
TransportService transportService,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
java.util.function.Supplier<Request> request,
java.lang.String executor) |
TransportBroadcastByNodeAction(Settings settings,
java.lang.String actionName,
ThreadPool threadPool,
ClusterService clusterService,
TransportService transportService,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
java.util.function.Supplier<Request> request,
java.lang.String executor,
boolean canTripCircuitBreaker) |
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,
java.lang.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,
java.util.List<ShardOperationResult> results,
java.util.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,
java.lang.String[] concreteIndices)
Determines the shards on which this operation will be executed on.
|
execute, execute, execute, execute
logDeprecatedSetting, logRemovedSetting, nodeName
public TransportBroadcastByNodeAction(Settings settings, java.lang.String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request, java.lang.String executor)
public TransportBroadcastByNodeAction(Settings settings, java.lang.String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<Request> request, java.lang.String executor, boolean canTripCircuitBreaker)
protected abstract ShardOperationResult readShardResult(StreamInput in) throws java.io.IOException
in
- input streamjava.io.IOException
protected abstract Response newResponse(Request request, int totalShards, int successfulShards, int failedShards, java.util.List<ShardOperationResult> results, java.util.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 java.io.IOException
in
- input streamjava.io.IOException
protected abstract ShardOperationResult shardOperation(Request request, ShardRouting shardRouting) throws java.io.IOException
request
- the node-level requestshardRouting
- the shard on which to execute the operationjava.io.IOException
protected abstract ShardsIterator shards(ClusterState clusterState, Request request, java.lang.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, java.lang.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<Request>,Response extends BroadcastResponse>
protected void doExecute(Task task, Request request, ActionListener<Response> listener)
doExecute
in class TransportAction<Request extends BroadcastRequest<Request>,Response extends BroadcastResponse>