Class AddVotingConfigExclusionsRequest

All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.RefCounted, TaskAwareRequest

public class AddVotingConfigExclusionsRequest
extends MasterNodeRequest<AddVotingConfigExclusionsRequest>
A request to add voting config exclusions for certain master-eligible nodes, and wait for these nodes to be removed from the voting configuration.
  • Field Details

    • DEPRECATION_MESSAGE

      public static final java.lang.String DEPRECATION_MESSAGE
      See Also:
      Constant Field Values
  • Constructor Details

    • AddVotingConfigExclusionsRequest

      public AddVotingConfigExclusionsRequest​(java.lang.String... nodeNames)
      Construct a request to add voting config exclusions for master-eligible nodes matching the given node names, and wait for a default 30 seconds for these exclusions to take effect, removing the nodes from the voting configuration.
      Parameters:
      nodeNames - Names of the nodes to add - see resolveVotingConfigExclusions(ClusterState)
    • AddVotingConfigExclusionsRequest

      public AddVotingConfigExclusionsRequest​(java.lang.String[] nodeDescriptions, java.lang.String[] nodeIds, java.lang.String[] nodeNames, org.elasticsearch.common.unit.TimeValue timeout)
      Construct a request to add voting config exclusions for master-eligible nodes matching the given descriptions, and wait for these nodes to be removed from the voting configuration.
      Parameters:
      nodeDescriptions - Descriptions of the nodes whose exclusions to add - see DiscoveryNodes.resolveNodes(String...).
      nodeIds - Ids of the nodes whose exclusions to add - see resolveVotingConfigExclusions(ClusterState).
      nodeNames - Names of the nodes whose exclusions to add - see resolveVotingConfigExclusions(ClusterState).
      timeout - How long to wait for the added exclusions to take effect and be removed from the voting configuration.
    • AddVotingConfigExclusionsRequest

      public AddVotingConfigExclusionsRequest​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • getNodeDescriptions

      public java.lang.String[] getNodeDescriptions()
      Returns:
      descriptions of the nodes for whom to add voting config exclusions.
    • getNodeIds

      public java.lang.String[] getNodeIds()
      Returns:
      ids of the nodes for whom to add voting config exclusions.
    • getNodeNames

      public java.lang.String[] getNodeNames()
      Returns:
      names of the nodes for whom to add voting config exclusions.
    • getTimeout

      public org.elasticsearch.common.unit.TimeValue getTimeout()
      Returns:
      how long to wait after adding the exclusions for the nodes to be removed from the voting configuration.
    • validate

      Specified by:
      validate in class ActionRequest
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class MasterNodeRequest<AddVotingConfigExclusionsRequest>
      Throws:
      java.io.IOException
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object