Module org.elasticsearch.server
Package org.elasticsearch.cluster
Record Class ShardHeapUsageEstimates
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.ShardHeapUsageEstimates
public record ShardHeapUsageEstimates(Map<ShardId,ShardAndIndexHeapUsage> perShard, ShardAndIndexHeapUsage defaultForShardsWithoutMetrics)
extends Record
Per-shard heap usage estimates from an
EstimatedHeapUsageCollector, plus a default for any shard that has no entry in
perShard().-
Constructor Summary
ConstructorsConstructorDescriptionShardHeapUsageEstimates(Map<ShardId, ShardAndIndexHeapUsage> perShard, ShardAndIndexHeapUsage defaultForShardsWithoutMetrics) Creates an instance of aShardHeapUsageEstimatesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultForShardsWithoutMetricsrecord component.static ShardHeapUsageEstimatesempty()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.perShard()Returns the value of theperShardrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShardHeapUsageEstimates
public ShardHeapUsageEstimates(Map<ShardId, ShardAndIndexHeapUsage> perShard, ShardAndIndexHeapUsage defaultForShardsWithoutMetrics) Creates an instance of aShardHeapUsageEstimatesrecord class.- Parameters:
perShard- the value for theperShardrecord componentdefaultForShardsWithoutMetrics- the value for thedefaultForShardsWithoutMetricsrecord component
-
-
Method Details
-
empty
-
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). -
perShard
Returns the value of theperShardrecord component.- Returns:
- the value of the
perShardrecord component
-
defaultForShardsWithoutMetrics
Returns the value of thedefaultForShardsWithoutMetricsrecord component.- Returns:
- the value of the
defaultForShardsWithoutMetricsrecord component
-