Class ThrottlingRate
- java.lang.Object
-
- org.forgerock.http.filter.throttling.ThrottlingRate
-
public final class ThrottlingRate extends Object
A value object to represent a throttling rate.
-
-
Constructor Summary
Constructors Constructor Description ThrottlingRate(int numberOfRequests, String duration)Constructs a newThrottlingRate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)org.forgerock.util.time.DurationgetDuration()Returns the duration of the sliding window.intgetNumberOfRequests()Returns the maximum of requests that can be filtered out during the duration.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
ThrottlingRate
public ThrottlingRate(int numberOfRequests, String duration)Constructs a newThrottlingRate.- Parameters:
numberOfRequests- the maximum of requests that can be filtered out during the duration.duration- the string representing the duration of the sliding window.
-
-
Method Detail
-
getNumberOfRequests
public int getNumberOfRequests()
Returns the maximum of requests that can be filtered out during the duration.- Returns:
- the maximum of requests that can be filtered out during the duration
-
getDuration
public org.forgerock.util.time.Duration getDuration()
Returns the duration of the sliding window.- Returns:
- the duration of the sliding window
-
-