Module org.elasticsearch.server
Record Class DesiredBalanceMetrics.NodeWeightStats
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceMetrics.NodeWeightStats
- Enclosing class:
DesiredBalanceMetrics
public static record DesiredBalanceMetrics.NodeWeightStats(long shardCount, double diskUsageInBytes, double writeLoad, double nodeWeight)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNodeWeightStats(long shardCount, double diskUsageInBytes, double writeLoad, double nodeWeight) Creates an instance of aNodeWeightStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thediskUsageInBytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thenodeWeightrecord component.longReturns the value of theshardCountrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thewriteLoadrecord component.
-
Field Details
-
ZERO
-
-
Constructor Details
-
NodeWeightStats
public NodeWeightStats(long shardCount, double diskUsageInBytes, double writeLoad, double nodeWeight) Creates an instance of aNodeWeightStatsrecord class.- Parameters:
shardCount- the value for theshardCountrecord componentdiskUsageInBytes- the value for thediskUsageInBytesrecord componentwriteLoad- the value for thewriteLoadrecord componentnodeWeight- the value for thenodeWeightrecord component
-
-
Method Details
-
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 with '=='. -
shardCount
public long shardCount()Returns the value of theshardCountrecord component.- Returns:
- the value of the
shardCountrecord component
-
diskUsageInBytes
public double diskUsageInBytes()Returns the value of thediskUsageInBytesrecord component.- Returns:
- the value of the
diskUsageInBytesrecord component
-
writeLoad
public double writeLoad()Returns the value of thewriteLoadrecord component.- Returns:
- the value of the
writeLoadrecord component
-
nodeWeight
public double nodeWeight()Returns the value of thenodeWeightrecord component.- Returns:
- the value of the
nodeWeightrecord component
-