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, transportService
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager
-
Constructor Summary
ConstructorDescriptionTransportAddIndexBlockAction
(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexStateService indexStateService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, DestructiveOperations destructiveOperations) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockException
checkBlock
(AddIndexBlockRequest request, ClusterState state) protected void
doExecute
(Task task, AddIndexBlockRequest request, ActionListener<AddIndexBlockResponse> listener) protected void
masterOperation
(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) Methods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
localExecute
Methods inherited from class org.elasticsearch.action.support.TransportAction
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:
doExecute
in classTransportMasterNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse>
-
checkBlock
- Specified by:
checkBlock
in classTransportMasterNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse>
-
masterOperation
protected void masterOperation(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) throws Exception - Specified by:
masterOperation
in classTransportMasterNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse> - Throws:
Exception
-