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 aEstimatedHeapUsage
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.long
double
double
double
long
Returns the value of theestimatedUsageBytes
record component.final int
hashCode()
Returns a hash code value for this object.nodeId()
Returns the value of thenodeId
record component.final String
toString()
Returns a string representation of this record class.long
Returns the value of thetotalBytes
record component.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
EstimatedHeapUsage
Creates an instance of aEstimatedHeapUsage
record class.- Parameters:
nodeId
- the value for thenodeId
record componenttotalBytes
- the value for thetotalBytes
record componentestimatedUsageBytes
- the value for theestimatedUsageBytes
record component
-
EstimatedHeapUsage
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in 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 thenodeId
record component.- Returns:
- the value of the
nodeId
record component
-
totalBytes
public long totalBytes()Returns the value of thetotalBytes
record component.- Returns:
- the value of the
totalBytes
record component
-
estimatedUsageBytes
public long estimatedUsageBytes()Returns the value of theestimatedUsageBytes
record component.- Returns:
- the value of the
estimatedUsageBytes
record component
-