Module org.elasticsearch.server
Class TransportClusterUpdateSettingsAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<ClusterUpdateSettingsRequest,ClusterUpdateSettingsResponse>
org.elasticsearch.action.support.HandledTransportAction<ClusterUpdateSettingsRequest,ClusterUpdateSettingsResponse>
org.elasticsearch.action.support.master.TransportMasterNodeAction<ClusterUpdateSettingsRequest,ClusterUpdateSettingsResponse>
org.elasticsearch.action.admin.cluster.settings.TransportClusterUpdateSettingsAction
- All Implemented Interfaces:
ActionWithReservedState<ClusterUpdateSettingsRequest>
public class TransportClusterUpdateSettingsAction
extends TransportMasterNodeAction<ClusterUpdateSettingsRequest,ClusterUpdateSettingsResponse>
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionTransportClusterUpdateSettingsAction(TransportService transportService, ClusterService clusterService, RerouteService rerouteService, ThreadPool threadPool, ActionFilters actionFilters, ClusterSettings clusterSettings) -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckBlock(ClusterUpdateSettingsRequest request, ClusterState state) skip check block if: Only at least one of cluster.blocks.read_only or cluster.blocks.read_only_allow_delete is being cleared (set to null or false).protected voidmasterOperation(Task task, ClusterUpdateSettingsRequest request, ClusterState state, ActionListener<ClusterUpdateSettingsResponse> listener) modifiedKeys(ClusterUpdateSettingsRequest request) Override this method to return the keys of the cluster state or cluster entities that are modified by the Request object.Override this method if the master node action also has anReservedClusterStateHandlerinteraction.Methods inherited from class org.elasticsearch.action.support.master.TransportMasterNodeAction
doExecute, 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
validateForReservedState
-
Constructor Details
-
TransportClusterUpdateSettingsAction
@Inject public TransportClusterUpdateSettingsAction(TransportService transportService, ClusterService clusterService, RerouteService rerouteService, ThreadPool threadPool, ActionFilters actionFilters, ClusterSettings clusterSettings)
-
-
Method Details
-
checkBlock
protected ClusterBlockException checkBlock(ClusterUpdateSettingsRequest request, ClusterState state) skip check block if: Only at least one of cluster.blocks.read_only or cluster.blocks.read_only_allow_delete is being cleared (set to null or false). Or all of the following are true: 1. At least one of cluster.blocks.read_only or cluster.blocks.read_only_allow_delete is being cleared (set to null or false). 2. Neither cluster.blocks.read_only nor cluster.blocks.read_only_allow_delete is being set to true. 3. The only other settings in this update are archived ones being set to null.- Specified by:
checkBlockin classTransportMasterNodeAction<ClusterUpdateSettingsRequest,ClusterUpdateSettingsResponse>
-
reservedStateHandlerName
Description copied from interface:ActionWithReservedStateOverride this method if the master node action also has anReservedClusterStateHandlerinteraction.We need to check if certain settings or entities are allowed to be modified by the master node action, depending on if they are set as reserved in 'operator' mode (file based settings, modules, plugins).
- Returns:
- an Optional of the
ReservedClusterStateHandlername
-
modifiedKeys
Description copied from interface:ActionWithReservedStateOverride this method to return the keys of the cluster state or cluster entities that are modified by the Request object.This method is used by the reserved state handler logic (see
ReservedClusterStateHandler) to verify if the keys don't conflict with an existing key set as reserved.- Parameters:
request- the TransportMasterNode request- Returns:
- set of String keys intended to be modified/set/deleted by this request
-
masterOperation
protected void masterOperation(Task task, ClusterUpdateSettingsRequest request, ClusterState state, ActionListener<ClusterUpdateSettingsResponse> listener) - Specified by:
masterOperationin classTransportMasterNodeAction<ClusterUpdateSettingsRequest,ClusterUpdateSettingsResponse>
-