Class TransportAddIndexBlockAction
java.lang.Object
org.opensearch.action.support.TransportAction<AddIndexBlockRequest,AddIndexBlockResponse>
org.opensearch.action.support.HandledTransportAction<AddIndexBlockRequest,AddIndexBlockResponse>
org.opensearch.action.support.clustermanager.TransportClusterManagerNodeAction<AddIndexBlockRequest,AddIndexBlockResponse>
org.opensearch.action.admin.indices.readonly.TransportAddIndexBlockAction
public class TransportAddIndexBlockAction
extends TransportClusterManagerNodeAction<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.- Opensearch.internal:
-
Field Summary
Fields inherited from class org.opensearch.action.support.clustermanager.TransportClusterManagerNodeAction
clusterService, indexNameExpressionResolver, threadPool, transportService
Fields inherited from class org.opensearch.action.support.TransportAction
actionName, taskManager
-
Constructor Summary
ConstructorsConstructorDescriptionTransportAddIndexBlockAction
(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
clusterManagerOperation
(AddIndexBlockRequest request, ClusterState state, org.opensearch.core.action.ActionListener<AddIndexBlockResponse> listener) protected void
clusterManagerOperation
(Task task, AddIndexBlockRequest request, ClusterState state, org.opensearch.core.action.ActionListener<AddIndexBlockResponse> listener) Override this operation if access to the task parameter is neededprotected void
doExecute
(Task task, AddIndexBlockRequest request, org.opensearch.core.action.ActionListener<AddIndexBlockResponse> listener) protected String
executor()
protected AddIndexBlockResponse
read
(org.opensearch.core.common.io.stream.StreamInput in) Methods inherited from class org.opensearch.action.support.clustermanager.TransportClusterManagerNodeAction
getClusterManagerActionName, getMasterActionName, localExecute, localExecuteSupportedByAction, masterOperation, masterOperation
Methods inherited from class org.opensearch.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
- Specified by:
executor
in classTransportClusterManagerNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse>
-
read
protected AddIndexBlockResponse read(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Specified by:
read
in classTransportClusterManagerNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse> - Throws:
IOException
-
doExecute
protected void doExecute(Task task, AddIndexBlockRequest request, org.opensearch.core.action.ActionListener<AddIndexBlockResponse> listener) - Overrides:
doExecute
in classTransportClusterManagerNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse>
-
checkBlock
- Specified by:
checkBlock
in classTransportClusterManagerNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse>
-
clusterManagerOperation
protected void clusterManagerOperation(AddIndexBlockRequest request, ClusterState state, org.opensearch.core.action.ActionListener<AddIndexBlockResponse> listener) throws Exception - Overrides:
clusterManagerOperation
in classTransportClusterManagerNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse> - Throws:
Exception
-
clusterManagerOperation
protected void clusterManagerOperation(Task task, AddIndexBlockRequest request, ClusterState state, org.opensearch.core.action.ActionListener<AddIndexBlockResponse> listener) throws Exception Description copied from class:TransportClusterManagerNodeAction
Override this operation if access to the task parameter is needed- Overrides:
clusterManagerOperation
in classTransportClusterManagerNodeAction<AddIndexBlockRequest,
AddIndexBlockResponse> - Throws:
Exception
-