Record Class IdempotencyManager.IdempotencyStats
java.lang.Object
java.lang.Record
com.loomcache.server.handler.IdempotencyManager.IdempotencyStats
- Enclosing class:
IdempotencyManager
public static record IdempotencyManager.IdempotencyStats(long totalRequests, long deduplicatedRequests, int cacheSize, double hitRate)
extends Record
Statistics for idempotency tracking.
-
Constructor Summary
ConstructorsConstructorDescriptionIdempotencyStats(long totalRequests, long deduplicatedRequests, int cacheSize, double hitRate) Creates an instance of aIdempotencyStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecacheSizerecord component.longReturns the value of thededuplicatedRequestsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublehitRate()Returns the value of thehitRaterecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalRequestsrecord component.
-
Constructor Details
-
IdempotencyStats
public IdempotencyStats(long totalRequests, long deduplicatedRequests, int cacheSize, double hitRate) Creates an instance of aIdempotencyStatsrecord class.- Parameters:
totalRequests- the value for thetotalRequestsrecord componentdeduplicatedRequests- the value for thededuplicatedRequestsrecord componentcacheSize- the value for thecacheSizerecord componenthitRate- the value for thehitRaterecord 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
-
deduplicatedRequests
public long deduplicatedRequests()Returns the value of thededuplicatedRequestsrecord component.- Returns:
- the value of the
deduplicatedRequestsrecord component
-
cacheSize
public int cacheSize()Returns the value of thecacheSizerecord component.- Returns:
- the value of the
cacheSizerecord component
-
hitRate
public double hitRate()Returns the value of thehitRaterecord component.- Returns:
- the value of the
hitRaterecord component
-