Module org.elasticsearch.server
Package org.elasticsearch.cluster
Record Class ShardAndIndexHeapUsage
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.ShardAndIndexHeapUsage
- All Implemented Interfaces:
Writeable
public record ShardAndIndexHeapUsage(long shardHeapUsageBytes, long indexHeapUsageBytes)
extends Record
implements Writeable
Tracks a shard's heap usage, as well as any index-level heap usage overhead that should be deduplicated per node.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ShardAndIndexHeapUsageUsed when no collector-specific default is available. -
Constructor Summary
ConstructorsConstructorDescriptionShardAndIndexHeapUsage(long shardHeapUsageBytes, long indexHeapUsageBytes) Creates an instance of aShardAndIndexHeapUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theindexHeapUsageBytesrecord component.longReturns the value of theshardHeapUsageBytesrecord component.toString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
ZERO
Used when no collector-specific default is available.
-
-
Constructor Details
-
ShardAndIndexHeapUsage
public ShardAndIndexHeapUsage(long shardHeapUsageBytes, long indexHeapUsageBytes) Creates an instance of aShardAndIndexHeapUsagerecord class.- Parameters:
shardHeapUsageBytes- the value for theshardHeapUsageBytesrecord componentindexHeapUsageBytes- the value for theindexHeapUsageBytesrecord component
-
ShardAndIndexHeapUsage
- Throws:
IOException
-
-
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 with '=='. -
shardHeapUsageBytes
public long shardHeapUsageBytes()Returns the value of theshardHeapUsageBytesrecord component.- Returns:
- the value of the
shardHeapUsageBytesrecord component
-
indexHeapUsageBytes
public long indexHeapUsageBytes()Returns the value of theindexHeapUsageBytesrecord component.- Returns:
- the value of the
indexHeapUsageBytesrecord component
-