java.lang.Object
java.lang.Record
org.elasticsearch.monitor.StatusInfo
- All Implemented Interfaces:
Writeable
Class that represents the Health status for a node as determined by
NodeHealthService
and provides additional
info explaining the reasons-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ConstructorDescriptionStatusInfo
(StatusInfo.Status status, String info) Creates an instance of aStatusInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.getInfo()
final int
hashCode()
Returns a hash code value for this object.info()
Returns the value of theinfo
record component.status()
Returns the value of thestatus
record component.toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
StatusInfo
- Throws:
IOException
-
StatusInfo
Creates an instance of aStatusInfo
record class.- Parameters:
status
- the value for thestatus
record componentinfo
- the value for theinfo
record component
-
-
Method Details
-
getInfo
-
getStatus
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
info
Returns the value of theinfo
record component.- Returns:
- the value of the
info
record component
-