Module org.elasticsearch.server
Record Class NodeAllocationStatsAndWeightsCalculator.NodeAllocationStatsAndWeight
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.routing.allocation.NodeAllocationStatsAndWeightsCalculator.NodeAllocationStatsAndWeight
- Enclosing class:
NodeAllocationStatsAndWeightsCalculator
public static record NodeAllocationStatsAndWeightsCalculator.NodeAllocationStatsAndWeight(int shards, int undesiredShards, double forecastedIngestLoad, long forecastedDiskUsage, long currentDiskUsage, float currentNodeWeight)
extends Record
Node shard allocation stats and the total node weight.
-
Constructor Summary
ConstructorsConstructorDescriptionNodeAllocationStatsAndWeight(int shards, int undesiredShards, double forecastedIngestLoad, long forecastedDiskUsage, long currentDiskUsage, float currentNodeWeight) Creates an instance of aNodeAllocationStatsAndWeightrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecurrentDiskUsagerecord component.floatReturns the value of thecurrentNodeWeightrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theforecastedDiskUsagerecord component.doubleReturns the value of theforecastedIngestLoadrecord component.final inthashCode()Returns a hash code value for this object.intshards()Returns the value of theshardsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theundesiredShardsrecord component.
-
Constructor Details
-
NodeAllocationStatsAndWeight
public NodeAllocationStatsAndWeight(int shards, int undesiredShards, double forecastedIngestLoad, long forecastedDiskUsage, long currentDiskUsage, float currentNodeWeight) Creates an instance of aNodeAllocationStatsAndWeightrecord class.- Parameters:
shards- the value for theshardsrecord componentundesiredShards- the value for theundesiredShardsrecord componentforecastedIngestLoad- the value for theforecastedIngestLoadrecord componentforecastedDiskUsage- the value for theforecastedDiskUsagerecord componentcurrentDiskUsage- the value for thecurrentDiskUsagerecord componentcurrentNodeWeight- the value for thecurrentNodeWeightrecord 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 '=='. -
shards
public int shards()Returns the value of theshardsrecord component.- Returns:
- the value of the
shardsrecord component
-
undesiredShards
public int undesiredShards()Returns the value of theundesiredShardsrecord component.- Returns:
- the value of the
undesiredShardsrecord component
-
forecastedIngestLoad
public double forecastedIngestLoad()Returns the value of theforecastedIngestLoadrecord component.- Returns:
- the value of the
forecastedIngestLoadrecord component
-
forecastedDiskUsage
public long forecastedDiskUsage()Returns the value of theforecastedDiskUsagerecord component.- Returns:
- the value of the
forecastedDiskUsagerecord component
-
currentDiskUsage
public long currentDiskUsage()Returns the value of thecurrentDiskUsagerecord component.- Returns:
- the value of the
currentDiskUsagerecord component
-
currentNodeWeight
public float currentNodeWeight()Returns the value of thecurrentNodeWeightrecord component.- Returns:
- the value of the
currentNodeWeightrecord component
-