Module org.elasticsearch.server
Record Class NodesRemovalPrevalidation
java.lang.Object
java.lang.Record
org.elasticsearch.action.admin.cluster.node.shutdown.NodesRemovalPrevalidation
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
public record NodesRemovalPrevalidation(boolean isSafe, String message, List<NodesRemovalPrevalidation.NodeResult> nodes)
extends Record
implements ToXContentObject, Writeable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumstatic final recordThe prevalidation result of a node.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConstructingObjectParser<NodesRemovalPrevalidation, Void> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionNodesRemovalPrevalidation(boolean isSafe, String message, List<NodesRemovalPrevalidation.NodeResult> nodes) Creates an instance of aNodesRemovalPrevalidationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static NodesRemovalPrevalidationfromXContent(XContentParser parser) final inthashCode()Returns a hash code value for this object.booleanisSafe()Returns the value of theisSaferecord component.message()Returns the value of themessagerecord component.nodes()Returns the value of thenodesrecord component.static NodesRemovalPrevalidationreadFrom(StreamInput in) final StringtoString()Returns a string representation of this record class.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
PARSER
-
-
Constructor Details
-
NodesRemovalPrevalidation
public NodesRemovalPrevalidation(boolean isSafe, String message, List<NodesRemovalPrevalidation.NodeResult> nodes) Creates an instance of aNodesRemovalPrevalidationrecord class.- Parameters:
isSafe- the value for theisSaferecord componentmessage- the value for themessagerecord componentnodes- the value for thenodesrecord component
-
-
Method Details
-
readFrom
- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
isSafe
public boolean isSafe()Returns the value of theisSaferecord component.- Returns:
- the value of the
isSaferecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
nodes
Returns the value of thenodesrecord component.- Returns:
- the value of the
nodesrecord component
-