java.lang.Object
java.lang.Record
org.elasticsearch.cluster.EstimatedHeapUsage
- All Implemented Interfaces:
Writeable
public record EstimatedHeapUsage(String nodeId, long totalBytes, long estimatedUsageBytes)
extends Record
implements Writeable
Record representing an estimate of the heap used by allocated shards and ongoing merges on a particular node
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionEstimatedHeapUsage(String nodeId, long totalBytes, long estimatedUsageBytes) Creates an instance of aEstimatedHeapUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longdoubledoubledoublelongReturns the value of theestimatedUsageBytesrecord component.final inthashCode()Returns a hash code value for this object.nodeId()Returns the value of thenodeIdrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalBytesrecord component.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
EstimatedHeapUsage
Creates an instance of aEstimatedHeapUsagerecord class.- Parameters:
nodeId- the value for thenodeIdrecord componenttotalBytes- the value for thetotalBytesrecord componentestimatedUsageBytes- the value for theestimatedUsageBytesrecord component
-
EstimatedHeapUsage
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
estimatedFreeBytes
public long estimatedFreeBytes() -
estimatedFreeBytesAsPercentage
public double estimatedFreeBytesAsPercentage() -
estimatedUsageAsPercentage
public double estimatedUsageAsPercentage() -
estimatedUsageAsRatio
public double estimatedUsageAsRatio() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-
totalBytes
public long totalBytes()Returns the value of thetotalBytesrecord component.- Returns:
- the value of the
totalBytesrecord component
-
estimatedUsageBytes
public long estimatedUsageBytes()Returns the value of theestimatedUsageBytesrecord component.- Returns:
- the value of the
estimatedUsageBytesrecord component
-