Package com.rale4j.sb.core
Class RateLimitFactory
java.lang.Object
com.rale4j.sb.core.RateLimitFactory
Factory class for creating rate limit strategies.
-
Constructor Summary
ConstructorsConstructorDescriptionRateLimitFactory
(Map<String, RateLimitStrategy> strategies) Constructor for RateLimitFactory. -
Method Summary
Modifier and TypeMethodDescriptiongetStrategy
(String name) Retrieves a rate limit strategy by name.
-
Constructor Details
-
RateLimitFactory
Constructor for RateLimitFactory.- Parameters:
strategies
- a map of rate limit strategies
-
-
Method Details
-
getStrategy
Retrieves a rate limit strategy by name.- Parameters:
name
- the name of the rate limit strategy- Returns:
- the rate limit strategy, or a safe fallback strategy
-