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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
CasFeatureModule.FeatureCatalog
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDescribe the available bandwidth and the overall limitations.boolean
Whether the request should block until capacity becomes available.boolean
Decide whether bucket4j functionality should be enabled.setBandwidth
(List<Bucket4jBandwidthLimitProperties> bandwidth) Describe the available bandwidth and the overall limitations.setBlocking
(boolean blocking) Whether the request should block until capacity becomes available.setEnabled
(boolean enabled) Decide whether bucket4j functionality should be enabled.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
isDefined, isUndefined
-
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
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
Decide whether bucket4j functionality should be enabled.- Returns:
this
.
-
setBlocking
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
.
-