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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHealthInfo(Map<String, DiskHealthInfo> diskInfoByNode, DataStreamLifecycleHealthInfo dslHealthInfo, Map<String, RepositoriesHealthInfo> repositoriesInfoByNode) Creates an instance of aHealthInforecord class.HealthInfo(StreamInput input) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thediskInfoByNoderecord component.Returns the value of thedslHealthInforecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therepositoriesInfoByNoderecord component.final StringtoString()Returns a string representation of this record class.voidwriteTo(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 aHealthInforecord class.- Parameters:
diskInfoByNode- the value for thediskInfoByNoderecord componentdslHealthInfo- the value for thedslHealthInforecord componentrepositoriesInfoByNode- the value for therepositoriesInfoByNoderecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin 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 thediskInfoByNoderecord component.- Returns:
- the value of the
diskInfoByNoderecord component
-
dslHealthInfo
Returns the value of thedslHealthInforecord component.- Returns:
- the value of the
dslHealthInforecord component
-
repositoriesInfoByNode
Returns the value of therepositoriesInfoByNoderecord component.- Returns:
- the value of the
repositoriesInfoByNoderecord component
-