R - result typepublic class RateLimiterConfig<R> extends PolicyConfig<R>
RateLimiter.| Modifier and Type | Method and Description |
|---|---|
long |
getMaxPermits()
For bursty rate limiters, returns the max permitted executions per
period, else null
if the rate limiter is not bursty. |
Duration |
getMaxRate()
For smooth rate limiters, returns the max rate at which individual executions are permitted, else
null if
the rate limiter is not smooth. |
Duration |
getMaxWaitTime()
Returns the max time to wait for permits to be available.
|
Duration |
getPeriod()
For bursty rate limiters, returns the period after which permits are reset to
maxPermits,
else null if the rate limiter is not bursty. |
getFailureListener, getSuccessListenerpublic Duration getMaxRate()
null if
the rate limiter is not smooth.public long getMaxPermits()
period, else null
if the rate limiter is not bursty.public Duration getPeriod()
maxPermits,
else null if the rate limiter is not bursty.public Duration getMaxWaitTime()
RateLimitExceededException.
This setting only applies when the RateLimiter is used with the Failsafe class. It does not apply when the
RateLimiter is used in a standalone way.
Copyright © 2022. All rights reserved.