Class AddVotingConfigExclusionsRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- org.elasticsearch.action.support.master.MasterNodeRequest<AddVotingConfigExclusionsRequest>
-
- org.elasticsearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest
-
- All Implemented Interfaces:
Streamable
,Writeable
,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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
-
Constructor Summary
Constructors Constructor Description AddVotingConfigExclusionsRequest(java.lang.String[] nodeDescriptions)
Construct a request to add voting config exclusions for master-eligible nodes matching the given descriptions, and wait for a default 30 seconds for these exclusions to take effect, removing the nodes from the voting configuration.AddVotingConfigExclusionsRequest(java.lang.String[] nodeDescriptions, 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.AddVotingConfigExclusionsRequest(StreamInput in)
-
Method Summary
Modifier and Type Method Description java.lang.String[]
getNodeDescriptions()
TimeValue
getTimeout()
void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.java.lang.String
toString()
ActionRequestValidationException
validate()
void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
-
-
-
Constructor Detail
-
AddVotingConfigExclusionsRequest
public AddVotingConfigExclusionsRequest(java.lang.String[] nodeDescriptions)
Construct a request to add voting config exclusions for master-eligible nodes matching the given descriptions, and wait for a default 30 seconds for these exclusions to take effect, removing the nodes from the voting configuration.- Parameters:
nodeDescriptions
- Descriptions of the nodes to add - seeDiscoveryNodes.resolveNodes(String...)
-
AddVotingConfigExclusionsRequest
public AddVotingConfigExclusionsRequest(java.lang.String[] nodeDescriptions, 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 - seeDiscoveryNodes.resolveNodes(String...)
.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 Detail
-
getNodeDescriptions
public java.lang.String[] getNodeDescriptions()
- Returns:
- descriptions of the nodes for whom to add voting config exclusions.
-
getTimeout
public TimeValue getTimeout()
- Returns:
- how long to wait after adding the exclusions for the nodes to be removed from the voting configuration.
-
validate
public ActionRequestValidationException validate()
- Specified by:
validate
in classActionRequest
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classMasterNodeRequest<AddVotingConfigExclusionsRequest>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<AddVotingConfigExclusionsRequest>
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-