Enum Class SimRateSpec.Verb
- All Implemented Interfaces:
Serializable,Comparable<SimRateSpec.Verb>,Constable
- Enclosing class:
SimRateSpec
Rate limiters can be put into motion in different modes to suit different scenarios. This is
mostly to support advanced scripting capability. When the verb is not specified in a
SimRateSpec,
then it is started immediately as a user would expect.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSpecify that a rate limiter should only be configured without affecting its running state.The restart action on a rate limiter causes it to be re-initialized as if it were just being started for the first time.The default behavior for a rate limiter. -
Method Summary
Modifier and TypeMethodDescriptionstatic SimRateSpec.VerbReturns the enum constant of this class with the specified name.static SimRateSpec.Verb[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
configure
Specify that a rate limiter should only be configured without affecting its running state. If the rate limiter is already running, then the configuration should take effect immediately. A rate limiter will be created automatically if needed. Configurations that do not effectively change the rate limiter are ignored. This does not automatically start the rate limiter. It will need to be started explicitly before it is used. -
start
The default behavior for a rate limiter. This means that the rate limiter should be started at the time this rate spec is applied. The start time of a rate limiter is significant in that it determines both the calculated average rate and the accumulated wait time from slow callers. In order to start, a rate limiter will be configured automatically, if the provided rate spec would cause a change to the configuration. If a rate limiter is started that is already running, an error should be thrown. If it is desired to ignore this condition, the restart should be used instead. -
restart
The restart action on a rate limiter causes it to be re-initialized as if it were just being started for the first time. This causes any accumulated wait time or time resources to be zeroed. This type of specifier can be useful, for example, when iterating on a workload with different target rates, where each iteration is independent of the others. In order to restart, a rate limiter will be configured if necessary. -
stop
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-