Record Class EmailRateLimiter.RateLimitQuota
java.lang.Object
java.lang.Record
cloud.opencode.base.email.security.EmailRateLimiter.RateLimitQuota
- Record Components:
minuteRemaining- remaining quota for current minute | 当前分钟剩余配额hourRemaining- remaining quota for current hour | 当前小时剩余配额dayRemaining- remaining quota for current day | 当前天剩余配额
- Enclosing class:
EmailRateLimiter
public static record EmailRateLimiter.RateLimitQuota(int minuteRemaining, int hourRemaining, int dayRemaining)
extends Record
Rate limit quota record
频率限制配额记录
- Since:
- JDK 25, opencode-base-email V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionRateLimitQuota(int minuteRemaining, int hourRemaining, int dayRemaining) Creates an instance of aRateLimitQuotarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedayRemainingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thehourRemainingrecord component.intReturns the value of theminuteRemainingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RateLimitQuota
public RateLimitQuota(int minuteRemaining, int hourRemaining, int dayRemaining) Creates an instance of aRateLimitQuotarecord class.- Parameters:
minuteRemaining- the value for theminuteRemainingrecord componenthourRemaining- the value for thehourRemainingrecord componentdayRemaining- the value for thedayRemainingrecord 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. -
minuteRemaining
public int minuteRemaining()Returns the value of theminuteRemainingrecord component.- Returns:
- the value of the
minuteRemainingrecord component
-
hourRemaining
public int hourRemaining()Returns the value of thehourRemainingrecord component.- Returns:
- the value of the
hourRemainingrecord component
-
dayRemaining
public int dayRemaining()Returns the value of thedayRemainingrecord component.- Returns:
- the value of the
dayRemainingrecord component
-