Module org.elasticsearch.server
Class TransportAddIndexBlockAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<AddIndexBlockRequest,AddIndexBlockResponse>
org.elasticsearch.action.support.HandledTransportAction<AddIndexBlockRequest,AddIndexBlockResponse>
org.elasticsearch.action.support.master.TransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
org.elasticsearch.action.admin.indices.readonly.TransportAddIndexBlockAction
- All Implemented Interfaces:
ActionWithReservedState<AddIndexBlockRequest>
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
FieldsFields inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
clusterService, executor, threadPool, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportAddIndexBlockAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexStateService indexStateService, ActionFilters actionFilters, ProjectResolver projectResolver, 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(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) Methods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
localExecute, validateForReservedStateMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnlyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.reservedstate.ActionWithReservedState
modifiedKeys, reservedStateHandlerName, validateForReservedState
-
Field Details
-
TYPE
-
-
Constructor Details
-
TransportAddIndexBlockAction
@Inject public TransportAddIndexBlockAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexStateService indexStateService, ActionFilters actionFilters, ProjectResolver projectResolver, 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(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) throws Exception - Specified by:
masterOperationin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse> - Throws:
Exception
-