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.Params
Nested 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 aDesiredNodeWithStatus
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns the value of thedesiredNode
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
final int
hashCode()
Returns a hash code value for this object.boolean
pending()
static DesiredNodeWithStatus
readFrom
(StreamInput in) status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
PARSER
-
-
Constructor Details
-
DesiredNodeWithStatus
Creates an instance of aDesiredNodeWithStatus
record class.- Parameters:
desiredNode
- the value for thedesiredNode
record componentstatus
- the value for thestatus
record component
-
-
Method Details
-
pending
public boolean pending() -
actualized
public boolean actualized() -
externalId
-
readFrom
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
compareTo
- Specified by:
compareTo
in 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 thedesiredNode
record component.- Returns:
- the value of the
desiredNode
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-