java.lang.Object
java.lang.Record
org.elasticsearch.health.node.HealthInfo
- Record Components:
diskInfoByNode
- A Map of node id to DiskHealthInfo for that node
- All Implemented Interfaces:
Writeable
public record HealthInfo(Map<String,DiskHealthInfo> diskInfoByNode)
extends Record
implements Writeable
This class wraps all the data returned by the health node.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionHealthInfo
(Map<String, DiskHealthInfo> diskInfoByNode) Creates an instance of aHealthInfo
record class.HealthInfo
(StreamInput input) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thediskInfoByNode
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput output) Write this into the StreamOutput.
-
Field Details
-
EMPTY_HEALTH_INFO
-
-
Constructor Details
-
HealthInfo
- Throws:
IOException
-
HealthInfo
Creates an instance of aHealthInfo
record class.- Parameters:
diskInfoByNode
- the value for thediskInfoByNode
record component
-
-
Method Details
-
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)
. -
diskInfoByNode
Returns the value of thediskInfoByNode
record component.- Returns:
- the value of the
diskInfoByNode
record component
-