Record Class PasswordLoginRateLimiter.Decision
java.lang.Object
java.lang.Record
io.leandev.appfuse.security.auth.PasswordLoginRateLimiter.Decision
- Enclosing interface:
PasswordLoginRateLimiter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowed()Returns the value of theallowedrecord component.booleandegraded()Returns the value of thedegradedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlimit()Returns the value of thelimitrecord component.intReturns the value of theremainingrecord component.resetAt()Returns the value of theresetAtrecord component.longReturns the value of theretryAfterSecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Decision
public Decision(boolean allowed, int limit, int remaining, Instant resetAt, long retryAfterSeconds, boolean degraded) Creates an instance of aDecisionrecord class.- Parameters:
allowed- the value for theallowedrecord componentlimit- the value for thelimitrecord componentremaining- the value for theremainingrecord componentresetAt- the value for theresetAtrecord componentretryAfterSeconds- the value for theretryAfterSecondsrecord componentdegraded- the value for thedegradedrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
allowed
public boolean allowed()Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
remaining
public int remaining()Returns the value of theremainingrecord component.- Returns:
- the value of the
remainingrecord component
-
resetAt
Returns the value of theresetAtrecord component.- Returns:
- the value of the
resetAtrecord component
-
retryAfterSeconds
public long retryAfterSeconds()Returns the value of theretryAfterSecondsrecord component.- Returns:
- the value of the
retryAfterSecondsrecord component
-
degraded
public boolean degraded()Returns the value of thedegradedrecord component.- Returns:
- the value of the
degradedrecord component
-