Class BaseBucket4jProperties

java.lang.Object
org.apereo.cas.configuration.model.support.bucket4j.BaseBucket4jProperties
All Implemented Interfaces:
Serializable, CasFeatureModule
Direct Known Subclasses:
Bucket4jThrottleProperties, CasSimpleMultifactorAuthenticationBucket4jProperties

@RequiresModule(name="cas-server-support-bucket4j-core") public abstract class BaseBucket4jProperties extends Object implements CasFeatureModule, Serializable
Configuration properties class for bucket4j.
Since:
6.5.0
See Also:
  • Constructor Details

    • BaseBucket4jProperties

      public BaseBucket4jProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Decide whether bucket4j functionality should be enabled.
    • isBlocking

      public boolean isBlocking()
      Whether the request should block until capacity becomes available. Consume a token from the token bucket. If a token is not available this will block until the refill adds one to the bucket.
    • getBandwidth

      public List<Bucket4jBandwidthLimitProperties> getBandwidth()
      Describe the available bandwidth and the overall limitations. Multiple bandwidths allow for different policies per unit of measure. (i.e. allows 1000 tokens per 1 minute, but not often then 50 tokens per 1 second).
    • setEnabled

      public BaseBucket4jProperties setEnabled(boolean enabled)
      Decide whether bucket4j functionality should be enabled.
      Returns:
      this.
    • setBlocking

      public BaseBucket4jProperties setBlocking(boolean blocking)
      Whether the request should block until capacity becomes available. Consume a token from the token bucket. If a token is not available this will block until the refill adds one to the bucket.
      Returns:
      this.
    • setBandwidth

      Describe the available bandwidth and the overall limitations. Multiple bandwidths allow for different policies per unit of measure. (i.e. allows 1000 tokens per 1 minute, but not often then 50 tokens per 1 second).
      Returns:
      this.