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, transportService
Fields 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 ClusterBlockException
checkBlock(AddIndexBlockRequest request, ClusterState state)
protected void
doExecute(Task task, AddIndexBlockRequest request, ActionListener<AddIndexBlockResponse> listener)
protected java.lang.String
executor()
protected void
masterOperation(AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener)
protected void
masterOperation(Task task, AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener)
Override this operation if access to the task parameter is neededprotected AddIndexBlockResponse
read(StreamInput in)
Methods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
getMasterActionName, localExecute
Methods 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:
executor
in classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
-
read
- Specified by:
read
in classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
- Throws:
java.io.IOException
-
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(AddIndexBlockRequest request, ClusterState state, ActionListener<AddIndexBlockResponse> listener) throws java.lang.Exception- Specified by:
masterOperation
in 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:TransportMasterNodeAction
Override this operation if access to the task parameter is needed- Overrides:
masterOperation
in classTransportMasterNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
- Throws:
java.lang.Exception
-