Record Class AbuseLimitsPolicy.Limit
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.abuse.AbuseLimitsPolicy.Limit
- Record Components:
window- sliding-window lengthdelayAt- failure count at whichAbuseDecision.Delaykicks in, or 0 to disable the delay stepstepUpAt- failure count at whichAbuseDecision.RequireAdditionalCheckkicks in, or 0 to disableblockAt- failure count at whichAbuseDecision.Blockkicks in, or 0 to disabledelayLen- duration returned withAbuseDecision.DelayblockLen- duration returned withAbuseDecision.Block
- Enclosing class:
AbuseLimitsPolicy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintblockAt()Returns the value of theblockAtrecord component.blockLen()Returns the value of theblockLenrecord component.intdelayAt()Returns the value of thedelayAtrecord component.delayLen()Returns the value of thedelayLenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intstepUpAt()Returns the value of thestepUpAtrecord component.final StringtoString()Returns a string representation of this record class.window()Returns the value of thewindowrecord component.
-
Constructor Details
-
Limit
public Limit(Duration window, int delayAt, int stepUpAt, int blockAt, Duration delayLen, Duration blockLen) Creates an instance of aLimitrecord class.- Parameters:
window- the value for thewindowrecord componentdelayAt- the value for thedelayAtrecord componentstepUpAt- the value for thestepUpAtrecord componentblockAt- the value for theblockAtrecord componentdelayLen- the value for thedelayLenrecord componentblockLen- the value for theblockLenrecord 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. -
window
-
delayAt
-
stepUpAt
-
blockAt
-
delayLen
-
blockLen
-