@EachProperty(value="resilience4j.ratelimiter.configurations",
primary="default")
public class RateLimiterConfiguration
extends java.lang.Object
Constructor and Description |
---|
RateLimiterConfiguration(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.Long> |
getLimit() |
java.lang.String |
getName() |
java.util.Optional<java.time.Duration> |
getPeriod() |
java.util.Optional<java.time.Duration> |
getTimeout() |
void |
setLimit(java.lang.Long limit) |
void |
setPeriod(java.time.Duration period) |
void |
setTimeout(java.time.Duration timeout) |
public RateLimiterConfiguration(@Parameter java.lang.String name)
name
- The name of the configuration@Nonnull public java.lang.String getName()
@Nonnull public java.util.Optional<java.time.Duration> getPeriod()
public void setPeriod(java.time.Duration period)
period
- The refresh period of the rate limit@Nonnull public java.util.Optional<java.lang.Long> getLimit()
public void setLimit(java.lang.Long limit)
limit
- How many requests are allowed in the period@Nonnull public java.util.Optional<java.time.Duration> getTimeout()
public void setTimeout(java.time.Duration timeout)
timeout
- How long to wait for rate limit permission