Class Bucket4jBandwidthLimitProperties

java.lang.Object
org.apereo.cas.configuration.model.support.bucket4j.Bucket4jBandwidthLimitProperties
All Implemented Interfaces:
Serializable, CasFeatureModule

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

    • Bucket4jBandwidthLimitProperties

      public Bucket4jBandwidthLimitProperties()
  • Method Details

    • getInitialTokens

      public long getInitialTokens()
      By default initial size of bucket equals to capacity. But sometimes, you may want to have lesser initial size, for example for case of cold start in order to prevent denial of service.
    • getCapacity

      public long getCapacity()
      Number of tokens/requests that can be used within the time window.
    • getRefillCount

      public long getRefillCount()
      The number of tokens that should be used to refill the bucket given the specified refill duration.
    • getDuration

      public String getDuration()
      Time window in which capacity can be allowed.
    • getRefillDuration

      public String getRefillDuration()
      Duration to use to refill the bucket.
    • getRefillStrategy

      Describes how the bucket should be refilled. Specifies the speed of tokens regeneration.
    • setInitialTokens

      public Bucket4jBandwidthLimitProperties setInitialTokens(long initialTokens)
      By default initial size of bucket equals to capacity. But sometimes, you may want to have lesser initial size, for example for case of cold start in order to prevent denial of service.
      Returns:
      this.
    • setCapacity

      public Bucket4jBandwidthLimitProperties setCapacity(long capacity)
      Number of tokens/requests that can be used within the time window.
      Returns:
      this.
    • setRefillCount

      public Bucket4jBandwidthLimitProperties setRefillCount(long refillCount)
      The number of tokens that should be used to refill the bucket given the specified refill duration.
      Returns:
      this.
    • setDuration

      public Bucket4jBandwidthLimitProperties setDuration(String duration)
      Time window in which capacity can be allowed.
      Returns:
      this.
    • setRefillDuration

      public Bucket4jBandwidthLimitProperties setRefillDuration(String refillDuration)
      Duration to use to refill the bucket.
      Returns:
      this.
    • setRefillStrategy

      Describes how the bucket should be refilled. Specifies the speed of tokens regeneration.
      Returns:
      this.