Class TransportAddIndexBlockAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.HandledTransportAction<Request,Response>
org.elasticsearch.action.support.master.TransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
org.elasticsearch.action.admin.indices.readonly.TransportAddIndexBlockAction
public class TransportAddIndexBlockAction
extends TransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
Adds a single index level block to a given set of indices. Not only does it set the correct setting,
but it ensures that, in case of a write block, once successfully returning to the user, all shards
of the index are properly accounting for the block, for instance, when adding a write block all
in-flight writes to an index have been completed prior to the response being returned. These actions
are done in multiple cluster state updates (at least two). See also
TransportVerifyShardIndexBlockAction
for the eventual delegation for shard-level verification.-
Field Summary
Fields inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
clusterService, executor, indexNameExpressionResolver, threadPool, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, localConnection, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportAddIndexBlockAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexStateService indexStateService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, DestructiveOperations destructiveOperations) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckBlock(AddIndexBlockRequest request, ClusterState state)protected voiddoExecute(Task task, AddIndexBlockRequest request, ActionListener<AddIndexBlockResponse> listener)protected voidmasterOperation(AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener)protected voidmasterOperation(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener)Override this operation if access to the task parameter is neededMethods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
getMasterActionName, localExecuteMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute
-
Constructor Details
-
TransportAddIndexBlockAction
@Inject public TransportAddIndexBlockAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexStateService indexStateService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, DestructiveOperations destructiveOperations)
-
-
Method Details
-
doExecute
protected void doExecute(Task task, AddIndexBlockRequest request, ActionListener<AddIndexBlockResponse> listener)- Overrides:
doExecutein classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
-
checkBlock
- Specified by:
checkBlockin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
-
masterOperation
protected void masterOperation(AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) throws Exception- Specified by:
masterOperationin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>- Throws:
Exception
-
masterOperation
protected void masterOperation(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) throws ExceptionDescription copied from class:TransportMasterNodeActionOverride this operation if access to the task parameter is needed- Overrides:
masterOperationin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>- Throws:
Exception
-