Class ThrottlingRate

java.lang.Object
org.forgerock.openig.filter.throttling.ThrottlingRate

public final class ThrottlingRate extends Object
A value object to represent a throttling rate.
  • Constructor Details

    • ThrottlingRate

      public ThrottlingRate(int numberOfRequests, String duration)
      Constructs a new ThrottlingRate.
      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 Details

    • 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 Duration getDuration()
      Returns the duration of the sliding window.
      Returns:
      the duration of the sliding window
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object