Enum Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies
- java.lang.Object
-
- java.lang.Enum<Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies>
-
- org.apereo.cas.configuration.model.support.bucket4j.Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies>
- Enclosing class:
- Bucket4jBandwidthLimitProperties
public static enum Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies extends java.lang.Enum<Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies>
Describe options available for refill strategy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GREEDY
This type of refill regenerates tokens in a greedy manner; it tries to add the tokens to bucket as soon as possible.INTERVALLY
This type of refill regenerates tokens in intervally manner.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GREEDY
public static final Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies GREEDY
This type of refill regenerates tokens in a greedy manner; it tries to add the tokens to bucket as soon as possible. For example refill "10 tokens per 1 second" adds 1 token per each 100 millisecond; in other words refill will not wait 1 second to regenerate 10 tokens.
-
INTERVALLY
public static final Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies INTERVALLY
This type of refill regenerates tokens in intervally manner. "Intervally" in opposite to "greedy" will wait until whole period would be elapsed before regenerating tokens.
-
-
Method Detail
-
values
public static Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies c : Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-