Record Class PerClientRateLimiter.AggregateStats
java.lang.Object
java.lang.Record
com.loomcache.server.ratelimit.PerClientRateLimiter.AggregateStats
- Enclosing class:
PerClientRateLimiter
public static record PerClientRateLimiter.AggregateStats(long totalClientsTracked, long totalAllowedAcrossAllClients, long totalDeniedAcrossAllClients, double overallDenyRate, long timestamp)
extends Record
Aggregate statistics across all clients.
-
Constructor Summary
ConstructorsConstructorDescriptionAggregateStats(long totalClientsTracked, long totalAllowedAcrossAllClients, long totalDeniedAcrossAllClients, double overallDenyRate, long timestamp) Creates an instance of aAggregateStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theoverallDenyRaterecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalAllowedAcrossAllClientsrecord component.longReturns the value of thetotalClientsTrackedrecord component.longReturns the value of thetotalDeniedAcrossAllClientsrecord component.
-
Constructor Details
-
AggregateStats
public AggregateStats(long totalClientsTracked, long totalAllowedAcrossAllClients, long totalDeniedAcrossAllClients, double overallDenyRate, long timestamp) Creates an instance of aAggregateStatsrecord class.- Parameters:
totalClientsTracked- the value for thetotalClientsTrackedrecord componenttotalAllowedAcrossAllClients- the value for thetotalAllowedAcrossAllClientsrecord componenttotalDeniedAcrossAllClients- the value for thetotalDeniedAcrossAllClientsrecord componentoverallDenyRate- the value for theoverallDenyRaterecord componenttimestamp- the value for thetimestamprecord 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. -
totalClientsTracked
public long totalClientsTracked()Returns the value of thetotalClientsTrackedrecord component.- Returns:
- the value of the
totalClientsTrackedrecord component
-
totalAllowedAcrossAllClients
public long totalAllowedAcrossAllClients()Returns the value of thetotalAllowedAcrossAllClientsrecord component.- Returns:
- the value of the
totalAllowedAcrossAllClientsrecord component
-
totalDeniedAcrossAllClients
public long totalDeniedAcrossAllClients()Returns the value of thetotalDeniedAcrossAllClientsrecord component.- Returns:
- the value of the
totalDeniedAcrossAllClientsrecord component
-
overallDenyRate
public double overallDenyRate()Returns the value of theoverallDenyRaterecord component.- Returns:
- the value of the
overallDenyRaterecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-