Package sc.fiji.snt
Record Class SNTUtils.HeapInfo
java.lang.Object
java.lang.Record
sc.fiji.snt.SNTUtils.HeapInfo
- Record Components:
maxMB- the-XmxceilingtotalMB- the current heap sizeusedMB-totalMBminus current free memoryavailableMB-maxMB - usedMB, i.e., how much more can still be allocated
- Enclosing class:
SNTUtils
public static record SNTUtils.HeapInfo(long maxMB, long totalMB, long usedMB, long availableMB)
extends Record
Snapshot of JVM heap usage in MB, derived from a single
Runtime read.-
Constructor Summary
ConstructorsConstructorDescriptionHeapInfo(long maxMB, long totalMB, long usedMB, long availableMB) Creates an instance of aHeapInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theavailableMBrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longmaxMB()Returns the value of themaxMBrecord component.final StringtoString()Returns a string representation of this record class.longtotalMB()Returns the value of thetotalMBrecord component.longusedMB()Returns the value of theusedMBrecord component.
-
Constructor Details
-
HeapInfo
public HeapInfo(long maxMB, long totalMB, long usedMB, long availableMB) Creates an instance of aHeapInforecord class.- Parameters:
maxMB- the value for themaxMBrecord componenttotalMB- the value for thetotalMBrecord componentusedMB- the value for theusedMBrecord componentavailableMB- the value for theavailableMBrecord 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 '=='. -
maxMB
public long maxMB()Returns the value of themaxMBrecord component.- Returns:
- the value of the
maxMBrecord component
-
totalMB
public long totalMB()Returns the value of thetotalMBrecord component.- Returns:
- the value of the
totalMBrecord component
-
usedMB
public long usedMB()Returns the value of theusedMBrecord component.- Returns:
- the value of the
usedMBrecord component
-
availableMB
public long availableMB()Returns the value of theavailableMBrecord component.- Returns:
- the value of the
availableMBrecord component
-