java.lang.Object
java.lang.Record
org.elasticsearch.health.node.HealthInfo
- Record Components:
diskInfoByNode
- A Map of node id to DiskHealthInfo for that nodedslHealthInfo
- The data stream lifecycle health informationrepositoriesInfoByNode
- A Map of node id to RepositoriesHealthInfo for that node
- All Implemented Interfaces:
Writeable
public record HealthInfo(Map<String,DiskHealthInfo> diskInfoByNode, DataStreamLifecycleHealthInfo dslHealthInfo, Map<String,RepositoriesHealthInfo> repositoriesInfoByNode)
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, DataStreamLifecycleHealthInfo dslHealthInfo, Map<String, RepositoriesHealthInfo> repositoriesInfoByNode) Creates an instance of aHealthInfo
record class.HealthInfo
(StreamInput input) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thediskInfoByNode
record component.Returns the value of thedslHealthInfo
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.Returns the value of therepositoriesInfoByNode
record component.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
public HealthInfo(Map<String, DiskHealthInfo> diskInfoByNode, @Nullable DataStreamLifecycleHealthInfo dslHealthInfo, Map<String, RepositoriesHealthInfo> repositoriesInfoByNode) Creates an instance of aHealthInfo
record class.- Parameters:
diskInfoByNode
- the value for thediskInfoByNode
record componentdslHealthInfo
- the value for thedslHealthInfo
record componentrepositoriesInfoByNode
- the value for therepositoriesInfoByNode
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
-
dslHealthInfo
Returns the value of thedslHealthInfo
record component.- Returns:
- the value of the
dslHealthInfo
record component
-
repositoriesInfoByNode
Returns the value of therepositoriesInfoByNode
record component.- Returns:
- the value of the
repositoriesInfoByNode
record component
-