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, indexNameExpressionResolver, threadPool, transportServiceFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
Constructors Constructor Description TransportAddIndexBlockAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, MetadataIndexStateService indexStateService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, DestructiveOperations destructiveOperations) -
Method Summary
Modifier and Type Method Description protected ClusterBlockExceptioncheckBlock(AddIndexBlockRequest request, ClusterState state)protected voiddoExecute(Task task, AddIndexBlockRequest request, ActionListener<AddIndexBlockResponse> listener)protected java.lang.Stringexecutor()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 neededprotected AddIndexBlockResponseread(StreamInput in)Methods 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
-
executor
protected java.lang.String executor()- Specified by:
executorin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
-
read
- Specified by:
readin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>- Throws:
java.io.IOException
-
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 java.lang.Exception- Specified by:
masterOperationin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>- Throws:
java.lang.Exception
-
masterOperation
protected void masterOperation(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) throws java.lang.ExceptionDescription copied from class:TransportMasterNodeActionOverride this operation if access to the task parameter is needed- Overrides:
masterOperationin classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>- Throws:
java.lang.Exception
-