Package com.tnsai.quality.ratelimit
Enum Class Decision
- All Implemented Interfaces:
Serializable,Comparable<Decision>,Constable
Outcome of an
EventRateLimiter probe (issue #82).
Three values, mapped onto distinct downstream behaviours:
ACCEPT— caller publishes the event normally.DROP— caller silently discards the event. The rate-limiter records the drop so the next aggregate window emits aratelimit.droppedsummary.DEFER— caller queues the event for a later, slower publish path. Useful when the limiter wants to shed load without losing important events. Implementations that don't support deferred re-publish may treat this the same asDROP.
- Since:
- 0.10.0 (issue #82 — rate-limiting half of the cost-and-volume umbrella)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ACCEPT
-
DROP
-
DEFER
-
-
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
-