Record Class CapacityPlanner.CapacitySnapshot
java.lang.Object
java.lang.Record
com.loomcache.server.metrics.CapacityPlanner.CapacitySnapshot
- Enclosing class:
CapacityPlanner
public static record CapacityPlanner.CapacitySnapshot(long timestamp, long entryCount, long memoryUsed, long maxMemory)
extends Record
Snapshot of capacity metrics at a point in time.
-
Constructor Summary
ConstructorsConstructorDescriptionCapacitySnapshot(long timestamp, long entryCount, long memoryUsed, long maxMemory) Creates an instance of aCapacitySnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theentryCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxMemoryrecord component.longReturns the value of thememoryUsedrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CapacitySnapshot
public CapacitySnapshot(long timestamp, long entryCount, long memoryUsed, long maxMemory) Creates an instance of aCapacitySnapshotrecord class.- Parameters:
timestamp- the value for thetimestamprecord componententryCount- the value for theentryCountrecord componentmemoryUsed- the value for thememoryUsedrecord componentmaxMemory- the value for themaxMemoryrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
entryCount
public long entryCount()Returns the value of theentryCountrecord component.- Returns:
- the value of the
entryCountrecord component
-
memoryUsed
public long memoryUsed()Returns the value of thememoryUsedrecord component.- Returns:
- the value of the
memoryUsedrecord component
-
maxMemory
public long maxMemory()Returns the value of themaxMemoryrecord component.- Returns:
- the value of the
maxMemoryrecord component
-