Module org.elasticsearch.server
Record Class DesiredNodeWithStatus
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.metadata.DesiredNodeWithStatus
- All Implemented Interfaces:
Comparable<DesiredNodeWithStatus>,Writeable,ToXContent,ToXContentObject
public record DesiredNodeWithStatus(DesiredNode desiredNode, DesiredNodeWithStatus.Status status)
extends Record
implements Writeable, ToXContentObject, Comparable<DesiredNodeWithStatus>
-
Nested Class Summary
Nested ClassesNested 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<DesiredNodeWithStatus, Void> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionDesiredNodeWithStatus(DesiredNode desiredNode, DesiredNodeWithStatus.Status status) Creates an instance of aDesiredNodeWithStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the value of thedesiredNoderecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.booleanpending()static DesiredNodeWithStatusreadFrom(StreamInput in) status()Returns the value of thestatusrecord component.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
-
DesiredNodeWithStatus
Creates an instance of aDesiredNodeWithStatusrecord class.- Parameters:
desiredNode- the value for thedesiredNoderecord componentstatus- the value for thestatusrecord component
-
-
Method Details
-
pending
public boolean pending() -
actualized
public boolean actualized() -
externalId
-
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
-
compareTo
- Specified by:
compareToin interfaceComparable<DesiredNodeWithStatus>
-
equalsWithProcessorsCloseTo
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
desiredNode
Returns the value of thedesiredNoderecord component.- Returns:
- the value of the
desiredNoderecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-