Record Class RequestCoalescer.CoalescerStats
java.lang.Object
java.lang.Record
com.loomcache.server.handler.RequestCoalescer.CoalescerStats
- Enclosing class:
RequestCoalescer
public static record RequestCoalescer.CoalescerStats(long totalRequests, long coalescedRequests, int activeGroups, long totalSavings, double avgGroupSize)
extends Record
Statistics snapshot for the coalescer.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionCoalescerStats(long totalRequests, long coalescedRequests, int activeGroups, long totalSavings, double avgGroupSize) Creates an instance of aCoalescerStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveGroupsrecord component.doubleReturns the value of theavgGroupSizerecord component.longReturns the value of thecoalescedRequestsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalRequestsrecord component.longReturns the value of thetotalSavingsrecord component.
-
Constructor Details
-
CoalescerStats
public CoalescerStats(long totalRequests, long coalescedRequests, int activeGroups, long totalSavings, double avgGroupSize) Creates an instance of aCoalescerStatsrecord class.- Parameters:
totalRequests- the value for thetotalRequestsrecord componentcoalescedRequests- the value for thecoalescedRequestsrecord componentactiveGroups- the value for theactiveGroupsrecord componenttotalSavings- the value for thetotalSavingsrecord componentavgGroupSize- the value for theavgGroupSizerecord 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. -
totalRequests
public long totalRequests()Returns the value of thetotalRequestsrecord component.- Returns:
- the value of the
totalRequestsrecord component
-
coalescedRequests
public long coalescedRequests()Returns the value of thecoalescedRequestsrecord component.- Returns:
- the value of the
coalescedRequestsrecord component
-
activeGroups
public int activeGroups()Returns the value of theactiveGroupsrecord component.- Returns:
- the value of the
activeGroupsrecord component
-
totalSavings
public long totalSavings()Returns the value of thetotalSavingsrecord component.- Returns:
- the value of the
totalSavingsrecord component
-
avgGroupSize
public double avgGroupSize()Returns the value of theavgGroupSizerecord component.- Returns:
- the value of the
avgGroupSizerecord component
-