All Implemented Interfaces:
Serializable

public final class RateLimiterException extends ResilientException
Thrown when a RateLimiter rejects a call because the current window's permits are used up and no permit would become available within the configured maximum wait time.

The name carried by this exception is the rate limiter's own name, which must be a static, compile-time-known string — never request-derived or tenant-derived. It is used as a cardinality-bounded key/tag in metrics and logging; unbounded distinct names would cause unbounded memory growth in metrics backends.

See Also:
  • Constructor Details

    • RateLimiterException

      public RateLimiterException(String name, int limit, Duration period, Duration maxWait)
  • Method Details

    • name

      public String name()
      The rate limiter instance name.
    • limit

      public int limit()
      The number of calls permitted per window.
    • period

      public Duration period()
      The window length.
    • maxWait

      public Duration maxWait()
      How long the call was allowed to wait for a permit before being rejected (zero means fail-fast).